Melatonin - <AUTHOR> http://www.gwern.net/Melatonin <comment><USER2> I use melatonin regularly to regulate my sleep cycle. It's a very effective part of a regimen (sleep hygiene, f.lux, etc) that allows me to manage a nearly-decade long problem of insomnia.

However, from a psychological standpoint, it's a very good thing melatonin is so safe. Every single person I've ever recommended melatonin to, I've directed to this article and discussed it with them. Every single such person then went ahead to promptly forget the discussion, NOT read the article, and take mildly retarded doses. For example, "one (5mg) pill didn't work, so I took 8 more at 4am." Another uses it almost recreationally - large doses to intensify his dreams; pretty much zero attempt to use it to improve his sleep. I don't talk to people about melatonin anymore.

For a quicker idea of where melatonin sits vis-à-vis other sleep drugs (WARNING: Hilarious Ambien Walrus referenced): [http://slatestarcodex.com/2013/09/28/sleep-now-by- prescripti...](http://slatestarcodex.com/2013/09/28/sleep-now-by- prescription/)

<comment><USER3> I have terrible sleep habits and often find it difficult to fall asleep before 5am. I have been considering trying melatonin but my major concern is that I will become dependent on it. I don't want my body to stop producing whatever small amount it already does through its use as a supplement.

How dependent on it would you say you are? How well would you function if you were unable to get hold of it?

<comment><USER4> It's not addictive. In fact I found myself not wanting to take it after a while because I had so much energy from getting good sleep, I wanted to stay up late doing stuff. (Even though I should, so I get to sleep at a decent hour.)

I recommended 1mg per 50lbs of body weight, and get the fast acting one, not the slow-dissolving one; those made me drowsy the next morning.

It is a little harder to snap to attention right after waking up, but I shake that off quickly; probably a sign I slept well.

It does affect everyone differently though. I haven't had any negative effects myself, other than with the slow-dissolving "long-lasting" pills (but some might need that to stay asleep).

<comment><USER2> Interesting. I'm not sure I've seen extended-release melatonin. IIRC melatonin does not help you stay asleep, so that would be fairly useless.

I recommend starting at the smallest dose you can find designed for sublingual (under-the-tongue dissolving) administration. 0.3mg to 1mg is a good range.

<comment><USER4> This is the extended release one that made me sleepy the next day:

[http://www.jamiesonvitamins.com/node/1418](http://www.jamiesonvitamins.com/node/1418)

This is the one I use that works great:

[http://www.jamiesonvitamins.com/chocolate_mint_melatonin](http://www.jamiesonvitamins.com/chocolate_mint_melatonin)

</comment></comment></comment></comment></comment><comment><USER5> My youngest daughter is borderline ADHD, and rather than trying Ritalin we've been using Melatonin in the evenings to help ease the bedtime process. (In the hopes that more sleep will help her cope with problems focusing.)

The change has been dramatic. Previously it was a 3-4 hour battle each night for her to get ready for bed and stay in bed. Now with 3mg of Melatonin she spontaneously decides to get ready for bed herself and goes to sleep in minutes.

The most interesting thing about Melatonin isn't that it makes you drowsy or helps you sleep, it's that it increases the _desire_ for sleep. While I don't usually have trouble sleeping, it's often hard to break myself free from a computer or a device at night, and Melatonin changes this. As the author says, "It works."

<comment><USER6> 3mg might be too much. I am not a doctor, but my sleep doctor is, and she recommended half that amount -- right around sunset.

<comment><USER7> I remember reading in at least one study that there's no added benefit of doses above 1mg. I checked the "Brzezinski et al" article and it says:

      The dose response relationships in 11 of the studies
      (see Refs. 17,18) support the existence of a plateau
      effect, with maximum effect generally being achieved
      at low doses (e.g. 0.3 mg) and maintained or
      diminished at higher doses.

</comment></comment></comment><comment><USER8> I don't have personal experience with it; but my sleep schedule is horrible (I tend to stay up to 5am on alternate nights), so I may give it a try to enforce a normal bedtime, and kick the procrastination monster down a bit (if I don't have the _option_ of doing the unpleasant work at 2am, it's far easier to force myself to do it during normal hours).

But: see here, this is very relevant: [http://hpmor.com/notes/98/](http://hpmor.com/notes/98/)

Search MetaMed (a few screens down) for Eliezer Yudkowsky's experience with a sleep disorder (his normal day is 24.5 hours): after spending years trying a whole laundry list of solutions including melatonin, he finally paid MetaMed somewhere north of $5K for their analysis, and got a solution using melatonin that worked (but was not the normal approach to melatonin supplementation).

 _" their best suggestion, although it had little or no clinical backing, was that I should take my low-dose melatonin 5-7 hours before bedtime, instead of 1-2 hours, a recommendation which I'd never heard anywhere before.

And it worked.

I can't _#&$ing believe that # _$%ing worked.

(EDIT in response to reader questions: "Low-dose" melatonin is 200microgram (mcg) = 0.2 mg. Currently I'm taking 0.2mg 5.5hr in advance, and taking 1mg timed-release just before closing my eyes to sleep. However, I worked up to that over time – I started out just taking 0.3mg total, and I would recommend to anyone else that they start at 0.2mg.)"_

<comment><USER9> This is how I do it as well. I use 300 microgram time released at sunset. Then a 1000 microgram instant release before bed. The 1000 microgram is not needed for me to get good sleep, but it puts my dosage at where body temp drops can be seen.

</comment></comment><comment><USER10> Gwern comes close to suggesting filtering blue light, but I will repeat a previous post. I've tried melatonin, but it is no substitute for for filtering blue light in my experience, and it tends to induce horrific, apocalyptic nightmares (granted, a night dreaming of EAS Emergency Action Notifications is better than no sleep at all).

I used to be an owl for years--decades. A regular 9-5 schedule seemed out of reach. All previous attempts quickly led to backsliding and accusations of moral failure. However, I found that an involuntary physiological response to artificial light in the range 460-484nm was involved.

This May I changed my environment by filtering out blue light after 8PM, turning off white lamps and turing on amber compact fluorescents. I'm asleep ~ 10PM and up usually ~ 5AM. This is now my regular schedule. It would have been inconceivable for me six months ago.

I use the following:

1\. Inexpensive Uvex amber goggles from Amazon: [http://www.amazon.com/Uvex-S0360X-Ultra-spec-SCT-Orange- Anti...](http://www.amazon.com/Uvex-S0360X-Ultra-spec-SCT-Orange-Anti- Fog/dp/B003OBZ64M/ref=sr_1_2?s=hi&ie=UTF8&qid=1379337848&sr=1-2&keywords=uvex+amber+glasses) Wear them at least an hour or two before bedtime. I also have the considerably more expensive glasses from lowbluelights.com. In my experience, the inexpensive goggles work just as well, although the more expensive glasses filter more blue light.

2\. I replaced most of the white compact fluorescent lights in my apartment with amber compact fluorescent lights [https://www.lowbluelights.com/index.asp](https://www.lowbluelights.com/index.asp)

3\. And I use a sunrise simulator alarm clock. [http://www.amazon.com/Philips- HF3520-Wake-Up-Colored-Simulat...](http://www.amazon.com/Philips-HF3520-Wake- Up-Colored- Simulation/dp/B0093162RM/ref=sr_1_cc_2?s=aps&ie=UTF8&qid=1380118779&sr=1-2-catcorr&keywords=philips+dawn+simulator) Sometimes I forget to set the clock--now I don't seem to need it.

Not to mention f.lux (pardon the paralipsis), though again, in my experience, filtering is necessary.

Concerning the scientific basis for the claim that blue light in the range 460-484nm suppresses melatonin production, here is one reference: [http://en.wikipedia.org/wiki/Photosensitive_ganglion_cell](http://en.wikipedia.org/wiki/Photosensitive_ganglion_cell)

Moral: Nagging and moralizing was both uninformative and ineffective. Science and engineering was both informative and effective.

<comment><USER11> > it tends to induce horrific, apocalyptic nightmares

I've used melatonin for years, as have many of my friends and family, and I've never had anyone mention this. I've always had more vivid dreams with melatonin, but I've never had nightmares.

<comment><USER12> Perhaps it's something to do with particular makes of the drug, but I've also had my worst nightmares while on it, and the words GP used are spot on for me. My mom, aunt and other members of my family had similar experiences and we've mostly stopped taking it. I did partly because it no longer has the surefire effect it once had on me, and partly because I'd often wake up in a crappy/despairing mood because of the apocalyptic nightmares.

On the other hand, I really miss it back when it worked mostly wonderfully. I coupled my intake with an experiment on segmented sleep, where I'd take it some time before 4pm and sleep till around 9pm, often waking up in a so called "writer's mood," and then sleep again (without Melatonin) from roughly 1am till 4am. I tend to be a very unfocused person, but on these intervals between first sleep and second sleep I'd feel in an elevated state of consciousness where my focus was like a laser I could point anywhere. Sublime is a good word, everything feels light and effortless, and the right thoughts just flow when you need them. I'm sure people have felt similarly while on other kinds of drugs, which is interesting to say the least. But I was sober and really productive, and have written my best fiction in this way.

<comment><USER11> Melatonin isn't a drug, it's the neurohormone that provokes sleep. Your body produces it naturally already.

<comment><USER13> Damn straight it's a drug. It's one your body just happens to produce. It's having a biochemical interaction at concentrations far less than would be required for a chemical reaction (such as neutralizing acid in the stomach with calcium carbonate). Similar to using the pill to modify the reproductive cycle.

</comment></comment></comment></comment></comment><comment><USER14> _Melatonin is a clear-cut Good Thing. The gains I have laid out are large enough I consider it irrational for someone not to use it._

I consider it irrational for someone to believe that a limited number of hand- selected studies can give you absolute confidence.

<comment><USER15> First, it's not a "limited number of hand-selected studies." The Brzezinski meta-study ( [http://www.gwern.net/docs/melatonin/2005-brzezinski.pdf](http://www.gwern.net/docs/melatonin/2005-brzezinski.pdf) ) alone covered 17 studies and 284 participants. There's even a clear, well- documented causal mechanism, which can't be said for most of the supplement industry.

Even if it were a limited number of studies, gwern's not going for "absolute confidence". (Indeed, requiring "absolute confidence" before attempting a thing is irrational by the following sentence.) Irrational here means doing something with expected value less than zero. If you're a person living in an industrialized society with ready access to electrical lighting -- the possible gains are too large to be balanced out by the time wasted trying it. That's what gwern's saying.

<comment><USER14> And how do you claim to calculate expected value here? You are making the same error he is by ignoring the possible "black swan", which, with every drug, can have dramatic consequences.

A positive but cautious conclusion like [http://www.vanderbilt.edu/AnS/psychology/health_psychology/m...](http://www.vanderbilt.edu/AnS/psychology/health_psychology/melatonin.htm#Conclusions%20on%20Melatonin) would have been much more appropriate.

<comment><AUTHOR> > You are making the same error he is by ignoring the possible "black swan", > which, with every drug, can have dramatic consequences.

The black swan is a pretty useless concept at this point, because people like you will drag it out against anything they dislike. You cannot give any rigorous formulation or evidence for it, and the best you can do is drag out some old example like thalidomide.

<comment><USER14> No rigorous formulation? The black swan has a very simple mathematical model: an unlikely event with an effect so great that it will affect the expected value. For example, a greater risk of dying after 20 or 30 years of use - which has not yet been studied. In your calculation of ROI you completely ignore unknown long term effects.

Yes it's hard and often impossible to quantify black swans. But keeping them in mind is a way to avoid overconfident articles like the one you wrote.

<comment><AUTHOR> > The black swan has a very simple mathematical model: an unlikely event with > an effect so great that it will affect the expected value. For example, a > greater risk of dying after 20 or 30 years of use - which has not yet been > studied. In your calculation of ROI you completely ignore unknown long term > effects.

Alright, let me clarify it then: by the remotely meaningful version presented by Taleb, your argument doesn't work and Taleb's writings support taking melatonin, rather than not taking melatonin. Why? Because even in the event of a negative 'black swan' your losses are strictly limited: the worse that can happen is you die. In fact, if I may borrow Taleb's 2x2 table from _The Black Swan_ where he brings up positive 'black swans' as well, it's easier to make a case that taking melatonin is a positive 'black swan': the negative possibilities are strictly in Mediocristan, with limited losses, easy to measure over large populations, predictable, not varying over time; while the positive possibilities look like some of Taleb's examples of attempting to exploit positive 'black swans' in Absurdistan - improved productivity, healthy, and seizing opportunities, things with potentially unlimited payoffs - such as moving to cities and networking with people.

> For example, a greater risk of dying after 20 or 30 years of use - which has > not yet been studied.

FUD.

<comment><AUTHOR> > That's true of every black swan - the worst that can happen is everybody > dies.

Not at all. Taleb like to use the example of selling insurance and shorts, where your downside is unlimited. Millions, billions, trillions... Think AIG or LTCM. Not everything has consequences solely for health.

> You do not mention any studies of long term effects and you consider FUD > raising the possibility that there could be adverse effects.

In the absence of any evidence whatsoever for that, and plenty of positive correlations, short-term studies without any problem... Yes. It is FUD. Fear, uncertainty, and doubt.

> When more and more studies show negative long term effect of substances that > were considered innocuous (like vitamins), it's not FUD, it's being > reasonably cautious.

Only some vitamins show any mortality effects, the mortality effects while real are pretty small, the vitamins did not deliver the _long-term_ health benefits promised (but never really demonstrated in experiments) which might offset the harm, and the vitamins were being consumed in huge doses. The first reduces the possibility of any such outcome, the second points out that you are exaggerating the harm, the third means that vitamins were a purely speculative play unlike melatonin, and the fourth reduces the concern that any such thing would happen with melatonin when one sticks to the suggested doses like 0.5mg rather than 5mg.

<comment><USER14> If everybody died, money would have no value. So yes, it's always worse than losing an unlimited amount of money.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER16> The problem with a lack of FDA regulation is that there is no guarantee on what you are taking. The freshness of the product and the veracity of what's in the pills will always be suspect to me.

If I could trust where I get my melatonin from, I would gladly take it. But I've learned too much about how terrible this industry is.

<comment><USER9> I don't trust many, but I do trust Nature's Way, Now Foods, and Jarrows. They do proper batching and testing.

<comment><USER17> I'd also strongly recommend the Trader Joe's brand. I've been using melatonin for a couple of years and haven't found anything that has been as consistently effective.

<comment><USER18> I've heard many of TJs supplements are white labelled Nature's way products

</comment></comment></comment></comment><comment><USER19> Melatonin does work wonders, but you never know how your own body might react to it.

I have many issues with my sleep cycle and quality of sleep. Melatonin is one of the few things that alleviates my problems. However, for me, it's only good for one night. I can take melatonin for one night out of a month, and get a blissful, restful night of sleep. If I take it two nights in a row, evil side- effects start creeping up.

It begins with a headache. If I take melatonin two nights in a row, the next day I will wake up with a headache that's hard to shake. My dreams, while very vivid and pleasant the first night, become more gloomy and depressing the second night. By the third day, my dreams are full-on, vivid, terrifying nightmares. I feel depressed and angry all day, and the headache borders a migraine. After four days of melatonin, I'm a wreck. It no longer puts me to sleep, nor gives me restful sleep. It becomes nothing more than a pill full of nightmares, depression, anger, and a bad migraine.

The first time I started taking melatonin, I had no idea it was causing these side effects. It took a while to pin down, and I just assumed it was related to my ongoing battle with sleep. I do recommend it, just know that you may have adverse reactions to continued use.

<comment><USER20> I'm curious as to what dosage you're taking. Several sources I've seen suggest the dosage they recommend on the package is too high for many of the typical brands out there. Do you experience these symptoms when taking low-dose melatonin (<= 0.5 mg)?

<comment><USER19> I've tried both high and low dose, and many different brands. Effects are the same either way. I usually go with the high dose since I'll only be taking it for one night anyway.

</comment></comment></comment><comment><USER21> My wife is a terrible sleeper -- around bed-time she'll suddenly want to do various household chores, vacuum, chat endlessly etc., that combined with irregular and often stressful work, my usually very regular sleep pattern has been totally annihilated over the last 5-10 years.

It also reached the point in the last year that I needed to be at one work site a few days a week, but at 6am, then another site different days at 9am, then work from home the rest of the time which meant trying to "catch up" with a 10-11am wakeup.

I finally broke down and started taking 3 mg of Melatonin, but _only_ if I've had 2 recurring nights if bad sleep. The effect is kind of strange. About 20-30 minutes after taking it, my strongest desire in the world is to want to go to bed, but it doesn't exactly make me "sleepy". After my head hitting my pillow, I'm asleep in about 10 minutes. If I need to, I'll take it multiple days in a row until I feel like my sleep cycle is sorted out, then I stop. I'll also take it if I need to suddenly change my cycle and get up very early the next day or something. Wakefulness comes smoothly and refreshingly, not jarring.

I finally got my wife to start taking it and now all the fuss over getting her to go to sleep has ended completely. As soon as she starts wanting to do things and it's late at night, she pops a Melatonin pill and is asleep inside of 40 minutes.

It's absolutely transformed our sleep/work/live/wake cycles. It feels like I can finally wrestle a bit of control back from an overburdened modern life.

The only problem is that the next day I usually feel very cloudy headed the entire day and have a mild urge to go back to bed until mid-afternoon.

<comment><USER22> The cloudy headed thing is almost certainly due to a too-large dose. gwern recommends somewhere around 1/10th of the dose you are taking. I've been splitting 1mg pills in half.

</comment></comment><comment><USER23> Haven't read the article yet, but Melatonin does wonders for my sleep habits. Without it, it seems like my body really wants to function on a day that's 26 or so hours long. That tends to put me in a constant cycle of being not tired enough to go to sleep yet, falling asleep too late, not having enough sleep and being tired all day, then going to sleep the next night too early and starting over again the next day. Melatonin has made it much easier to get about the same amount of sleep every night.

</comment><comment><USER24> I cut caffeine out of my diet, (apart from chocolate) which has more or less cured my issues with sleeping. I think I could start drinking it again, but only pre mid day.

It is very hard to do (headaches, sleepy in the day etc), but worth a shot.

I also use earplugs, which I find it very hard to sleep without now (unless drunk). They not only block out noise, but you get conditioned that when you put them in it's time to sleep, it kind of gets you into a sleep mind set.

The other thing I find helps is if I find my mind racing I try and slow my breathing down as much as I can. I think it works on two levels, I focus on breathing and free my mind of jumping all over the place and it also slows your heart rate and therefore oxygen to the brain, which I think has the same effect :P

<comment><USER25> It is generally not recommended to sleep in earplugs, as you're risking inducing a tinnitus. Basically everyone has some background noise in his ears/head, but it is ordinarily discarded (not brought to consciousness) by central nerve system as it's much quieter than external sounds - but if you cut them out, you're risking that your brain becomes aware of that sound and bam - suddenly you have tinnitus. And it may very well stay with you for the rest of your life.

<comment><USER26> Out of curiosity, do you have a source for this? I developed tinnitus last year and currently do wear earplugs while sleeping, however I certainly don't want to make it worse.

<comment><USER25> An audiologist told me that.

<comment><USER24> Great, insomnia here I come!

</comment></comment></comment></comment></comment><comment><USER27> Why didn't you mention about the effects of a calcified pineal gland resulting from a Vitamin D and magnesium deficiency? Those are very common among the older folk, resulting in poor sleep quality, poor immune system, even increased chance of heart attacks.

<comment><USER16> ...and how can this be fixed?

<comment><USER27> 5,000 - 10,000 i.u.: Vitamin D3 in the morning.

300 - 600 mg: magnesium citrate.

My favorite brand is "30 Minutes of Sunshine" [http://www.lifespannutrition.com/lsn/products.asp?itemnumber...](http://www.lifespannutrition.com/lsn/products.asp?itemnumber=393) Bio-Tech Vitamin D3 is also very good: [http://www.biotechpharmacal.com/](http://www.biotechpharmacal.com/)

</comment></comment></comment><comment><USER28> Interesting data about melatonin, but I am very wary of appeals to "nature" and "natural" in articles like this. Such references are often proxies for the concept of "good" or "healthy", but that's not necessarily true. Epidermal sun damage is natural too.

For example biphasic sleep is a pattern that arises when the darkness period is significantly longer than the human need for sleep. If the darkness period is reduced to about the same length as the sleep need, then the sleep period is less interrupted. _But humans are not any more or less healthy under either sleep regime._

<comment><USER29> >Epidermal sun damage is natural too

If we're talking from an evolutionary stand-point, humans have protections to keep the sun from killing us. If you're in the sun a lot, you would have darker skin (or skin that grows darker as the sun's rays increase in intensity per the season). You wouldn't be spending all day inside in the Midwest and then be in Brazil the next day. The sun is natural, the way you're exposing (or not exposing) yourself to it is what is unnatural.

It's the same argument that cyanide is natural. Yeah, but humans tend not to find cyanide very tasty at all (as an evolutionary protection). People don't go around eating peach pits just for fun. Pure cyanide being added to foods in concentrated doses as a poison is a human invention and is not natural. Melatonin being used by the body to regulate sleep cycles _is_ natural in the sense that it happens whether we supplement it or not. The unnatural human invention is to boost the natural effect by taking more, or by taking it at a specific time rather than trusting our body to fully regulate its production.

</comment></comment><comment><USER30> I've had on and off problems with insomnia, but have finally come up with a pretty reliable method for overcoming it. Some of my methods were used by others as well.

I think it's important to identify what's causing the insomnia. It's not always going to be the same thing for everyone, or even for you, every single time.

Some days, for me, it's just simply because I have too much on my mind. Other times, it's because I've had too much stimulation and some times, it's just because I haven't had enough physical exertion during the day (most of my work is on a laptop).

Here's the routine that I now employ and I've been really good for a number of months straight (I helped a friend create a similar "routine" and he even blogged about it).

So my routine is as follows

1\. No HN, book reading ,or any kind of blogs, reddit etc (basically anything intellectually stimulating) after 8pm.

2\. Some strenuous physical exertion (e.g. Gym) every 2nd or 3rd day

3\. Anything that puts me into a more relaxed state, e.g Some fresh air at least half an hr before bed time, writing in a journal if my mind is going crazy with ideas, or reading some poetry/fiction (but nothing intellectually stimulating. i.e. something entertaining or relaxing).

4\. No computer screens at least 45mins before bedtime

5\. 1 teaspoon of blackseed oil 5 minutes before bedtime

6\. A decent mattress (Mine is a silentnight miracoil) - Some people don't realise how important your mattress is and how badly it can affect sleep.

7\. No stimulating conversation at least 45mins before bedtime, that includes emails, text messages, in-person conversations and phone calls.

I also make sure that i'm out of bed before 8am each day if i want to make sure I get good sleep for that night.

Basically, i've whittled it down to identifying which state is not in a relaxed mode and getting it to a desirable state .

i.e. emotional state (writing in a journal or meditative exercise), mental state (avoiding anything intellectually stimulating), physical state (physical exertion/blackseed oil/mattress)

<comment><USER31> What is the Blackseed oil for?

<comment><USER30> Magnesium (amongst other important minerals and fatty acids). To relax the nervous system.

</comment></comment></comment><comment><USER32> I'm disappointed to see no comments here whatsoever that are addressing one of the central (and AFAICT unsupported) claims of this article-- that regular melatonin use can reduce the amount of sleep needed by almost an hour.

I have no doubts that melatonin is very useful for getting to sleep quicker, but if the reduced sleep claim is accurate, then it may move from an occasional use when needed, to a default use.

There are many melatonin users here- any regular users care to share their feelings/anecdotes (or better!) on this?

<comment><USER33> I remarked on this above also. I have early morning waking also (not sure if it's insomnia or just my getting older).

I use melatonin when I know I'm stressed and would normally have trouble falling asleep. I try not to use it more than once a week and I am hesitant to habituate myself to it.

It is an interesting idea that my nights with early waking might nevertheless be more restful when taking melatonin, but I haven't noticed this particularly. Presently I am hoping more exercise will get me sleeping more solidly through the night.

</comment></comment><comment><USER34> I've been using melatonin on and off when I hit a patch of insomnia. It's pretty good; it just makes me super sleepy. Even with a low dose I end up groggy in the morning, however. But being able to actually fall asleep when I would otherwise lay awake for hours is worth the price of admission.

I don't use it regularly but sometimes I just know when I'm going to have trouble falling asleep, and will take one about a half hour before I'd like to be asleep. Works like a charm.

<comment><USER35> Have you tried taking it earlier in the evening? Half an hour before bed seems very late.

My professor in psychology grad school presented it's functioning and said it's best taken not later than ninety minutes before bed.

</comment></comment><comment><USER36> I've been using melatonin for years every night. As a person that has extreme obstructive sleep apnea, I credit melatonin with providing me a modicum of restful sleep for the years I didn't use a CPAP. Now that I have one, melatonin helps improve my "normal" sleep patterns.

Anecdotaly, I find melatonin usage helps my brain rewire itself every night. My belief is that increases the number of connections and associations that various concepts have, and it also elevates my mood. Not bad for something that costs mere pennies!

During the time I had almost no sleep, I would take quite a bit of melatonin in a desperate attempt to get some kind of rest. At times I would pop 25mg or more. I found there were no side effects, except perhaps being sleepy for the next couple of days.

I've also quit a number of times for various reasons. Just a few months ago I quit for three months due to surgery. I found quitting to be completely symptom-free, which kind of amazed me. I figured with years of usage, quitting would make it impossible to sleep. I based this opinion on numerous studies that show when you replace a naturally-occurring hormone with a supplement, your body stops producing it. Instead, I slept fine. Once I was out of the no- supplements period after surgery, I started back up with the melatonin. No side effects, and I almost immediately noticed an increase in creativity and mood.

I'm a supplement junkie. It's that irrational thing that I do, my black swan interest. Yes, I know, most of the market is just BS and marketing hype. But not all of it. Melatonin is one of the 2 or 3 supplements I use that I believe really make a huge and immediately perceivable difference. Can't recommend it highly enough.

<comment><USER37> > But not all of it. Melatonin is one of the 2 or 3 supplements I use that I > believe really make a huge and immediately perceivable difference.

What would the other 2 or 3 be? I've found Vitamin D (taken as a liquid) to be one.

<comment><USER36> Vitamin D-3 is one.

Resveratrol is on my "maybe" list. I'm seeing some really interesting research, but the good stuff may end up being patented and sold as a drug, which sucks.

I'm still a Vitamin C fan, even though it's fallen out of favor. Seems to help when I've stressed out my system through alcohol or other chemical irritants.

Also on my "to-watch" list is delta tocotrienols, one of the components of vitamin E. Saw some interesting evidence that it might be good at actually helping to remove coronary artery blockage, but it's still WAY preliminary. And no, that's not a recommendation for vitamin E itself, which in larger doses can cause all sorts of problems. Just the delta series.

The B series of vitamins are interesting, as there seems to be a good-sized gap between the amount most people have in their bloodstream and the amount that they can carry easily. A little dose of B-12 seems to help me enormously with concentration. At least for a short period. YMMV.

Note this is all subjective, and based on half-assed research and gossip. That's one of the rules in this arena: there are no rules. :)

</comment></comment></comment><comment><USER38> 1) I don't think it's known how big the "addictive" effects are. Meaning, if you use it a lot, you might get "used to it"(downregulation), and require more to get the same effect. See the link at the bottom; My doctor told me not to use it more then 4-5x a week; I have anecdotal evidence of it being less effective from my use

2) It might not be as effective as you're making it. It surely isn't as simple as "replacing the melatonin you're lacking". Melatonin you naturally produce happens in a series of step; the melatonin you take via a pill surpasses some of these steps, which means there isn't the same effect.

See [http://www.supermemo.com/articles/sleep.htm#Melatonin](http://www.supermemo.com/articles/sleep.htm#Melatonin)

</comment><comment><USER39> I found melatonin to be very effective, especially on mountaineering trips, where I'm not guaranteed a decent sleeping environment but really need to get some sleep when given the opportunity.

My girlfriend however reported nightmares when she started supplementing with it, but it appears to have gotten better.

</comment><comment><USER40> I take it when I travel across time zones to reset my internal clock. Works great! If I take if for more than 3-4 nights in a row it seems to lose its effectiveness.

<comment> at-fates-hands I was going to mention the same thing. I used it when I was flying a lot internationally and it worked to overcome my jet lag pretty effectively.

Definitely recommend it if you travel internationally.

</comment></comment><comment><USER41> I works great when you have this "thinking in your sleep and wake up even more tired" syndrome.

Melatonin related supplemements helps you relax quickly and really sleep deep. I personally found that taking 1/3 of recommended dose works perfectly. Taking full doze making me wake up in such a limb state - that it takes me literally one hour for muscles to get back into their ability to move the body.

Another thing is that I found that taking it for a week or two (no more) is optimal. Few cycles of deep, relaxed sleep are enough for body/mind to get into relatively better balance than before.

Adding regular physical exercise to the mix helps to reignite the whole system back.

<comment><USER8> How much more deeply does it make you sleep? I have small children; I don't want to be difficult to wake.

<comment><USER41> I use this (sleep support one):

[http://vibrantme.isagenix.com/ca/en/brainsleepsystem.html](http://vibrantme.isagenix.com/ca/en/brainsleepsystem.html)

1 week was enough for me.

It allows to relax and fall asleep quickly. Small doses will do and they will not diminish your ability to wake up and take care of kids.

Again - start with 1/3 of recommended dose and you should be fine.

</comment></comment></comment><comment><USER42> Lots of data at [http://examine.com/supplements/Melatonin/](http://examine.com/supplements/Melatonin/)

</comment><comment><USER43> Interesting. I work on call shifts. (Linux sysadmin, one week out of three is 24/7 on call -- which works much better than rotating one day out of three.) I've used Melatonin for years to 'regulate' my sleep cycle so that I can stop my tirelessly creative brain from thinking about that article I read a few hours ago on Hacker News.

My other 'hacks' to keep my sleep cycle regulated are f.lux where possible, using only dim incandescent lights in the evening around the house once I am ready for bed, and NOT using a laptop, iPad, or anything with white/blue LEDs in bed. Wake-up is accomplished with an alarm clock that activates a piece of "wall art" that slowly changes color spectrum to full daylight using LEDs and shines on the bed.

Having good control of my sleep cycle keeps jet lag, time changes, mid-night alerts, and other things that disrupt most people from disrupting me as much for as long.

<comment><USER44> Melatonin does NOT work as a remedy for jet lag. I don't find open access links to the relevant studies right now but [http://www.nojetlag.com/melatonin.html](http://www.nojetlag.com/melatonin.html) might give you a first idea.

<comment><USER45> Anecdotally, melatonin works wonders for me when traveling.

I take 1mg of melatonin between 7 and 9pm in the target time zone's frame, usually starting the day I travel or sometimes the day before. This translates to taking a pill at noon or so in SF before flying to Europe. I follow that up with a pill on the first few evenings of a trip.

I've been doing this for a few years now, and the only remnant of jetlag on such trips is that I feel terrible around 3pm in Europe, which translates to 6am. So I'm guessing that my natural not-yet-shifted sleep cycle is rebelling at that point and trying to convince my body that I just stayed up all night.

Of course, I am an n=1 population size, and the routine has worked so well that I haven't dared to do a significant time zone shift without it. So it could just be me, or it could be the placebo effect. And I'm perfectly ok with that, as long as the jet lag stays at bay.

</comment></comment></comment><comment><USER46> What no one is talking about but should know:

Melatonin is amazing for people that smoke weed. If you're one of those people that casually smoke but wake up the next morning feeling groggy and out of sync, take melatonin at night as directed in this article and other places. Getting into your bed will feel amazing. You will drift off to sleep, even if your iPad or music is on. And you will wake up like a normal person, except a bit more relaxed. As I became more and more successful I smoked less and less because of how it affected my performance the next day. With Melatonin I can smoke like Sophomore in college enjoying Adult Swim on a Sunday for the first time.

What no one else is talking about:

Melatonin can make you super constipated. Eat fiber, take fiber pills, eat a balanced diet high in vegetables and it should else. If you're on a neckbeard died, say goodbye to pooping regularly and when you do, it will be compact.

</comment><comment><USER47> There are some problems with Melatonin (as supplied) - you don't really know how much (if any) you're getting. Investigators found that quality control was very poor and some brands contained very little melatonin. (I can't find it now, but it was something like Consumer Reports or similar?)

It's a prescription only med in some places (UK) so you might not be able to get it.

But it is "remarkably effective"[1] for jet lag.

You might want to consider sleep hygiene[2] as well as (or instead of) melatonin or other sleep meds. (I really like zopiclone.)

[1] ([http://summaries.cochrane.org/CD001520/melatonin-for-the- pre...](http://summaries.cochrane.org/CD001520/melatonin-for-the-prevention- and-treatment-of-jet-lag))

[2] ([http://www.nhs.uk/Conditions/Insomnia/Pages/Treatment.aspx](http://www.nhs.uk/Conditions/Insomnia/Pages/Treatment.aspx))

<comment><USER48> A quick google gives me a big bunch of options for buying Melatonin in the UK - [http://www.hollandandbarrett.com/HealthNotes- Search?search=%...](http://www.hollandandbarrett.com/HealthNotes- Search?search=%2Fassets%2Fnutritional-supplement%2Fmelatonin%2F~default) for example.

Doesn't seem to be prescription-only unless I'm misunderstanding.

<comment><USER47> Wikipedia suggests prescription only in the UK. I think this is because it was banned as a food supplement in the 1990s, and only one medication got a licence, and that was a POM. Thus, any melatonin product is either an unlicensed medication (illegal) or prescription only.

The page you link to doesn't allow me to buy any product. Entering [melatonin] in their search box doesn't return any products containing melatonin.

([http://www.mhra.gov.uk/Howweregulate/Medicines/Licensingofme...](http://www.mhra.gov.uk/Howweregulate/Medicines/Licensingofmedicines/Legalstatusandreclassification/Listsofsubstances/index.htm))

"You can't buy melatonin over the counter in the UK" ([http://www.webmd.boots.com/sleep-disorders/insomnia-in- adult...](http://www.webmd.boots.com/sleep-disorders/insomnia-in-adults- melatonin))

MHRA does regulate melatonin sales and prescriptions. Here are two examples:

UK website has prescription only melatonin, being advertised for off-label use (jet lag) and is told to stop ([http://www.mhra.gov.uk/Howweregulate/Medicines/Advertisingof...](http://www.mhra.gov.uk/Howweregulate/Medicines/Advertisingofmedicines/Advertisinginvestigations/CON140628)) (Even though Cochrane found it's excellent for jetlag)

Also, unlicenced product ([http://www.mhra.gov.uk/Howweregulate/Medicines/Advertisingof...](http://www.mhra.gov.uk/Howweregulate/Medicines/Advertisingofmedicines/Advertisinginvestigations/CON044048))

EDIT: also, a web search for [buy codeine uk] returns many hits for offshore pharmacies selling into the UK.

<comment><USER48> Thanks for the detailed reply! Having looked into it a bit further - yep, you're right.

<comment><USER49> You can buy melatonin online in the UK from Biovea [http://www.biovea.com/uk/product_detail.aspx?NAME=MELATONIN-...](http://www.biovea.com/uk/product_detail.aspx?NAME=MELATONIN-5mg-180-Tablets&PID=21500#.Uk7192R4aoo)

<comment><USER48> Interesting! Any idea how they get around the legal issue?

<comment><USER32> It is legal to import prescription-only medicine into the UK, providing it does not have a higher level of scheduling too.

</comment></comment></comment></comment></comment></comment></comment><comment><USER50> Melatonin may help to battle cancer along with chemo: [http://virtualtrials.com/pdf/williams2013.pdf](http://virtualtrials.com/pdf/williams2013.pdf) (Page 46)

My life partner started taking 20mg melatonin per day when she started her chemo and radiation treatment after surgery for grade III anaplastic glioma (fully resected) about year and a half ago. She's taking it ever since. No side effects. It doesn't seem to help her sleep. She always fell asleep easily and slept good.

We decided it should be safe for her as there was a research (can't locate it now) where some women were given 20mg/day dose for, I guess two years or so, in hopes it shows some contraceptive properties. It didn't but no side effects showed up.

</comment><comment><USER51> I've tried pretty much every Over-The-Counter sleep aid there is. Melatonin is indeed the most effective one I've tried, but my experience is that tolerance builds up rather quickly. I can use it every night for maybe 2-4 weeks, but after that, the amount required to achieve the same effects become absurdly high.

Also, one thing I like about Melatonin is the lucidity of the dreams I experience while sleeping with it. Colors, sensations, and my memory of the dream the next morning are very intense.

Currently I'm using Valerian root[0], which is all-natural, and I don't develop a noticeable tolerance.

0: [http://en.wikipedia.org/wiki/Valerian_%28herb%29](http://en.wikipedia.org/wiki/Valerian_%28herb%29)

</comment><comment><USER52> I didn't see any citations for his claim that melatonin saves you an hour sleep per night. His entire argument is premised on this, but he barely discusses it - he just states it as a fact. Did I just miss something? Is there research supporting this claim?

</comment><comment><USER53> It's my understanding that taking Melatonin supplements will mess up your bodies natural ability to make it's own Melatonin (as will taking a lot of supplements). You are far better off trying to get your body to produce Melatonin on it's own.

<comment><USER54> Citation?

The article says:

> A 2010 trial tested a delayed-release melatonin over 6 months and found > minimal adverse effects and no tolerance or "addiction"

<comment> drugcite-com As for Melatonin Adverse Events, it's my site that's linked to under 'Uses', ([http://www.drugcite.com/?q=melatonin](http://www.drugcite.com/?q=melatonin)) It's important to sort the data by age and gender as the AE's can vary greatly. That data is FDA FAERS data that runs against many other datasets by the way.

<comment><AUTHOR> As I've pointed out in the past to you, I'm not sure what use we're supposed to be making of your admittedly nice site, given that we don't know how many people are using melatonin, how reliable any of these cases are, or what.

</comment></comment></comment></comment><comment><USER33> I tried melatonin thanks to this article (thanks gwern!).

It does help me get to sleep. I've used it about 10 times now and only once did I still have trouble falling asleep, and even then I did within an hour or so.

Unfortunately, it does NOT stop me from waking at 4:30 or 5 AM and then having trouble falling back asleep. Still, this is less stressful than not falling asleep in the first place.

Note that the probable effective dose is much lower than what you're likely to get in one pill from the store. I couldn't remember the effective dose, got 5mg pills, ended up quartering them.

I don't have any hangover effects, and I wonder if you all that do are taking too much.

It's worth trying if you have sleep issues.

</comment><comment><USER55> I have had issues with going to sleep my whole life (nap time in preschool I was last to fall asleep and last to wake up). First I have to say I took 3mg as a test run and it did nothing. My gf then said they give 10-15mg for patients at the hospital.

9mg was too effective at putting me out in 30 min (I weigh 200lbs). It was too difficult to wake up in the morning. 6mg seems best. My minds eye feels like it's wearing a sleeping mask because dreams are few and far between.

When I stopped taking it, dreams became vivid and memorable. I also took ZMA before and that does nothing in terms of getting to sleep, but you get some crazy strong dreams while on it.

</comment><comment><USER56> I've used melatonin and it definitely works, especially for improving the quality of sleep and sleeping under the sun.

However I've found that just not eating for 6-8 hours before you go to bed helps much more. Even eating an apple can disrupt sleep. This works really well because if you suppress eating before you got to sleep, you also wake up on time and pretty fresh to boot.

The only downsides are that some people get tempted too easily to eat before bed or that if you absolutely have to stay late an hour or two more, you'll still wake up 16 hours after you stopped eating, leaving you with less sleep than intended.

</comment><comment><USER57> I used to have a wildly erratic sleep schedule. Then I had a baby. Now I sleep from 10 pm to 7 am every single night.

While I know a lot of people have sleep disorders, I think a lot of people have bad sleep schedules simply because they can.

<comment><USER58> I assume your child is grown up, because 10 hrs of sleep a night for someone with an infant is absurd. And unfair.

<comment><USER57> He's 12 months, and I am absurdly lucky he has slept from 8:30 pm - 7 am since 7 months. He is really intensely physical at all times while awake, which I think wears him out.

<comment><USER58> Ok, 1 year is reasonable. My daughter started sleeping though the night pretty early, too, but the first few months were weird and hallucinatory in their sleeplessness.

</comment></comment></comment></comment><comment><USER59> I had been taking concentrated cherry juice which is high in natural meltonin.. made no discernible difference to me.. so I will try to see if melatonin tablets are available here (in New Zealand) and give it a go.

One thing I would love to know is (I may have missed it in the article) is whether melatonin supplements help with _staying_ asleep. I fall asleep just fine (10-15 minutes, often earlier) but it's when my brain gets into a routine of waking up at 3 or 4 am that I find particularly hard to deal with. I've simply not worked out strategies around it yet.

<comment><USER60> This is my problem too, and it normally happens when I am highly strung. I have had success with meditation, but during very stressful periods I still tend to awaken at 4am.

</comment></comment><comment><USER61> Keep in mind that melatonin is a hormone. Exogenous hormones can downregulate your body's natural production. Like anything hormonal you should not take it continuously for long periods of time.

<comment><USER36> Yes, this was exactly what I thought when I began using it. (See my other comment on this article) [https://news.ycombinator.com/item?id=6495786](https://news.ycombinator.com/item?id=6495786)

In practice, however, that didn't occur, at least for me.

I have no idea why. It would interesting to see if this is true for others. It's certainly true for other hormones besides melatonin.

</comment></comment><comment><USER62> The pharmacokinetics of pill-form melatonin may be responsible for the uneven-, or late-onset and morning grogginess. Others here have reported that and I experienced it as well.

I have yet to see others mentioning the following answer so ...

My doctor advised using sprayed liquid melatonin (purchased at Whole Foods). 1-2 sprays under the tongue and held there for 30 seconds, then washed throughout the mouth (a highly vascularized area) and swallowed, transports the hormone consistently so that sleep is compelled in 1 to 1.5 hours with no morning grogginess.

</comment><comment><USER63> Melatonin is this person's religion. I wonder how much time they spend thinking and talking about it.

Stranger still is the herd of commenters who condone the stuff. Do you really think this will make you need an hour less sleep than everyone else?

Sleep is important. Don't intentionally destroy your body's ability to regulate it. If you aren't already addicted to melatonin, it's not too late:

Go to bed and wake up at the same time every day. Don't drink caffeine after breakfast. Expose yourself to natural sunlight every day. Don't play Grand Theft Auto after midnight.

</comment><comment><USER64> I used to deal with periodic weeks of insomnia. As a stifle I really could not afford to spend a whole week without sleeping more than 5 hours as I would be basically non functional after a couple days. I began supplementing a single 5mg dose of melatonin and it has almost completely erased my insomnia. I have found that it has improved the quality of my sleep as well. The only side affect I've noticed is increased dreaming while taking it, however I quite enjoy that.

</comment><comment><USER65> Melatonin is not easily obtainable here in the UK (as far as I know) so when I saw some in a regular store in the US, I grabbed some to try it.

And boy.. I usually have no trouble falling asleep except when travelling or otherwise "out of sync" so I tried it and I felt like I wanted to sleep almost constantly for two days. So it works, but perhaps a bit too well for me, even with a single tablet. Maybe I have an abundance of melatonin already coursing my veins? :-)

<comment><USER66> Got mine from biovea.com (with a eurovital.com logo _shrugs_ ) ; they seem to have no problem whatsoever about shipping to the UK. IIRC, it's widely available in many countries in the EU (specifically eg. Finland), who have no problem whatsoever about shipping it to countries where it's prescription- only.

<comment><USER65> I suspect you already know this so this is for the benefit of third parties reading this.. but it's legal to buy prescription only drugs from overseas in the UK as long as they're only POM (e.g. modafinil) and not scheduled/classed (e.g. ritalin).

</comment></comment></comment><comment><USER67> Melatonin supplements have helped me numerous times to get to sleep after tossing and turning in my bed. It is something that I've taken as needed and as a nightly supplement. The biggest drawback to melatonin supplements is that you can sometimes wake up slightly groggy the next morning. The stuff is dirt cheap and commonly available. If you haven't tried it, this could be the sleeper supplement your missing.

</comment><comment><USER68> I don't think my body handles Melatonin very well... it definitely helps me sleep great! But the next day I am groggy for nearly half the entire day

</comment><comment><USER69> There is currently a study being conducted at the Woolcock Institute in Sydney in its effectiveness to treat delayed sleep phase disorder among other circadian rhythm disorders. [http://www.abc.net.au/news/2013-08-24/new-hope- to-treat-misd...](http://www.abc.net.au/news/2013-08-24/new-hope-to-treat- misdiagnosed-sleep-disorder/4909876)

</comment><comment><USER70> I experienced a strange side effect when experimenting with melatonin: My vision degraded as if I was having a migraine. I experienced tunnel vision and colorful artifacts without the headache. I can't say with 100% certainty that melatonin was the cause, but there was a correlation... and I have not experienced the problem since I stopped taking it.

</comment><comment><USER71> The key to using melatonin is to stop every few days and see if you sleep through the night. If you don't keep going otherwise wait until you have two nights without proper sleep. I had major sleep problems but this system has worked great and I have not had to use melatonin in quite a while. Like everything, moderation is key.

</comment><comment><USER72> A couple years back I was taking 3mg of melatonin nightly. It worked brilliantly for about 3 months. After that, while I'd feel sleepy and fall asleep as expected, I'd be wide awake 1 sleep cycle later (~90min).

I'd still recommend melatonin as a short term way to re-establish a regular bedtime/routine. Long term usage - less so.

</comment><comment><USER73> I take 1.5 mg every night before going to bed. It has solved pretty much all my sleep problems, and allows me to control my sleeping schedule much more easily (ie. on weekdays I go to bed at 12:15 AM, but on weekends I usually go to bed at 3 AM. I have no problem re-transitioning back to weekday schedule now, but I used to).

</comment><comment><USER74> Just throwing this out there... a bit of lost research on the subject. Pitty not all of the images were cached.

[http://web.archive.org/web/20011211164100/http://www.mechabi...](http://web.archive.org/web/20011211164100/http://www.mechabiotix.com/articles/melatonin/index.html)

</comment><comment><USER75> I have been taking Melatonin for a while now. However, I do not take it daily. I usually take it to adjust sleep schedules after a poor pattern. Sunday night for example I would take it to fix my poor weekend sleeping schedule. I think it's great to FIX sleeping schedules, not necessarily to take daily.

</comment><comment><USER76> I've taken it and really does help me sleep better. It helps me fall asleep easier if I wake up in the middle of the night. I was taking about 1/3 of a 3mg tablet.

I did stop taking it though because I felt depressed after about 2 weeks of taking it every day.

I will probably take it again periodically if I am traveling.

</comment><comment><USER77> I've taken meltonin for 19 years now. I've moved up my dosage in the last few months. I stayed on a very low dosage for a really long time, but am up to 10mgs now, and sleeping wonderfully.

The main side effect is being much more tired when you wake up, and that is cured by coffee. I love the stuff.

<comment><USER78> _The main side effect is being much more tired when you wake up, and that is cured by coffee. I love the stuff._

I noticed this the very first time I tried it - I slept in on a weekend, about 13h total and then felt very fuzzy and hung over.

That only happened once, and now I take it nightly.

Other recommended sleep hack: Tempur-Pedic sleep mask.

Seriously, it costs a lot more than the cheap plastic ones (although still only $30) but it is worth its weight in gold. For shift workers, it's great - you can sleep like a baby in full sunlight.

</comment></comment><comment><USER79> A new report in yesterday's Science ([http://www.sciencemag.org/content/342/6154/85.full](http://www.sciencemag.org/content/342/6154/85.full)) indicates that vasopressin receptor antagonists might be the jetlag drug of the future.

</comment><comment><USER80> I'm sure Melatonin is great, but it won't ever solve the "kids are waking up" problem.

<comment><USER81> Give melatonin to the kids.

</comment></comment><comment><USER82> Melatonin has made a huge difference in my life. I don't use it regularly, but when there's a day when I absolutely need to get a good night's sleep or other things will go badly, I no longer have to worry about it. I take 3mg of melatonin and wake up refreshed.

</comment><comment><USER83> I take 3mg and it works to help me sleep after an hour. I try to get to bed by 10:30.

My biggest problem still is that my alarm at 6AM wakes me during my active dream cycle and most restful sleep. I'm not sure how to time shift that to meet my needs.

Any advice?

<comment><USER84> There's alarm apps that will let you set your alarm based on sleep cycles. If that doesn't work, you can try various sleep measurement devices to wake you up at the right time.

<comment><USER85> I miss my WakeMate!

</comment></comment></comment><comment><USER86> Nightmares and sleep paralysis! Wheee! Advil works better as a sleep aid for me.

</comment><comment><USER87> Given that this is a naturally-occurring hormone, is there any chance that taking Melatonin regularly could cause your body to "get lazy" and eventually produce less of its own?

</comment><comment><USER88> Melatonin is prescription only in Germany. Bad luck, I guess.

<comment><USER89> Also in the UK according to some comments here[1]. Some comments suggested buying from websites like biovea. Do you happen to know if it's legal to buy there and import to Germany? (they even have a .de website in German).

I'm living in Germany, but not a native speaker, that's why I'm asking.

[1][https://news.ycombinator.com/item?id=6495576](https://news.ycombinator.com/item?id=6495576)

</comment></comment><comment><USER90> I've tried it a few times. I find that I sleep like a rock, but have a dull, throbbing headache in the morning. My wife swears by the stuff...

</comment><comment><USER91> It doesn't really make me fall asleep. It improves the quality of my sleep, making me wake up in the morning much easier.

</comment><comment><USER92> If I take Melatonin I feel like I've got St. Elmo's Fire and I can't sleep at all for hours.

<comment><USER93> What is St. Elmo's Fire? I can only find a weather phenomenon.

<comment><USER92> I have a tactile perception of glowing all over my body. It's really creepy.

<comment><AUTHOR> Could it be [https://en.wikipedia.org/wiki/Photosensitivity#Skin_reaction...](https://en.wikipedia.org/wiki/Photosensitivity#Skin_reactions) ?

</comment></comment></comment></comment><comment><USER94> Anyone used Melatonin w/ 5-HTP?

Is it safe (is it worth it) taking Melatonin if you're under 30 years old?

</comment><comment><USER95> This is very interesting. Wish hacker news had more hacking the human body articles.

<comment><USER96> Check OP's website for other hacks. Very comprehensive research(meta-analysis) on pretty much all nootropics and memory improving techniques.

<comment><USER95> Cool thanks. I'll check it out.

</comment></comment></comment><comment><USER97> I tried it for a short while but it gave me vivid nightmares.

</comment><comment><USER98> Why are all these Gwern.net posts showing up now?

<comment><AUTHOR> [https://news.ycombinator.com/item?id=6466422](https://news.ycombinator.com/item?id=6466422)

</comment></comment><comment><USER99> See lef.org for more info

</comment><comment><USER100> why is it so pro melatonin?</comment>


Sex toys and the Internet of Things collide – what could go wrong? - <AUTHOR> http://arstechnica.com/tech-policy/2016/09/sex-toys-and-the-internet-of-things-collide-what-could-go-wrong/ <comment><USER2> While I don't have any of this kind of device, I bought a Dropcam a few years ago, when they were new, without knowing that they stored everything on their servers. I was mortified, and immediately got rid of it. I feel like a home webcam is at least on par with this device in terms of how profound the invasion of privacy is.

That said, in this case, a lot of the stuff the device does couldn't readily be done without some sort of connection to a server in the cloud, I would think. I mean, Bluetooth can handle the local controls (and probably should, when available), but even the remote control app for my Fire TV phones home rather than using a local link; and that's a situation where I'm guaranteed to be in the same room with the device when I want to control it from my phone. But, they should be really clear about how much information they're passing around and where it ends up.

That was what upset me most about the Dropcam...I read the box, saw it had all the features I wanted, but no mention of, "BTW-We'll also be sending every video over the Internet to our servers, where we will sell you access to that data." I think one shouldn't have to guess about how a company implements stuff like this, particularly if there are other, non-privacy infringing, ways to implement the features. Hopefully they'll be more clear about it in the future.

<comment><USER3> I also bought a Dropcam Pro a few years ago, and from memory, it was pretty clear that it was cloud based. I've been pretty happy with it, but my goals are different.

I suspect you weren't the target market for Dropcam. It was sold, and is sold as a turnkey camera that works out of the box, that anybody can setup on minutes, has native mobile apps that let you watch from anywhere in the world, and records up to 30 days of footage, with motion/sound (and more person) alerts.

In contrast, I've also setup local hosted cameras (Unifi video cameras) for somebody else recording onto a rack mounted Dell R610 with S3 backups. Different needs.

Many of the features of Dropcam (now Nest Cam) aren't really possible without it being on the cloud. In particular, the new person alerts take advantage of ML in the cloud, as does the new Sightline feature that lets you scrub quickly over a few days in seconds.

<comment><USER4> > _Many of the features of Dropcam (now Nest Cam) aren 't really possible > without it being on my butt._

Oh, they totally are. They just chose not to do it this way. Some of that is because of it being a "turnkey" solution, but let's not pretend the cloud is required for most of them.

> _In particular, the new person alerts take advantage of ML in my butt_

It shouldn't need to. Detecting people on video streams is something your smartphone camera now does on-chip. At most it requires a DSP unit.

> _as does the new Sightline feature that lets you scrub quickly over a few > days in seconds._

That's just a video player with some added precalc on the video stream.

You could have all those features with your own storage server and interface in a local network. It's just that it is a little less "turnkey", so it wouldn't sell as well.

<comment><USER5> Ahem, Cloud to Butt is enabled ;)

<comment><USER4> I know ;).

</comment></comment></comment></comment></comment><comment><USER6> I know the default stance here is "everything should be internet-connected and everything should stream all available data back to the mothership whenever possible" because generally we're the ones building the things and receiving the data (and data is great, who doesn't love data?!)

But from the point of view of the person buying and using the things, this is just getting creepier and creepier.

<comment><USER7> Actually people are both at the same time. The more you have to develop this stuff the less you use it. 90% of the developers I know don't have a smart phone, no facebook account, don't use gmail as mail client, etc.

<comment><USER6> Yeah, the more people know about this stuff the more likely they seem to be to turn it off.

I'm amazed that you know that many people with no smart phone or facebook account, though - I know one person who doesn't have facebook, and no-one (as of a couple of years ago) who doesn't have a smartphone.

</comment></comment></comment><comment><USER8> [https://en.wikipedia.org/wiki/Teledildonics](https://en.wikipedia.org/wiki/Teledildonics)

<comment><USER9> I can't help but laugh and be impressed by the name at the same time.

</comment></comment><comment><USER10> From the article:

"However, given the intimate nature of our products, the privacy and security of our customers' data is of utmost importance to our company. Accordingly, we take concerns about customer privacy and our data practices seriously."

Just. Anonymise. Your. Data. At. Source.

This isn't that hard, come on. Your company's futur is at stake here.

<comment><USER11> "Accordingly, we take concerns about customer privacy and our data practices seriously."

This is typical of the meaningless boilerplate that companies use to acknowledge there's a problem but that they won't take any concrete steps to solve it.

Usually when I see something like "your privacy is important to us" but with nothing back it up, I interpret that as acknowledgement that they're going to sell all your data at some point in the future, maybe through acquisition such as when Google bought Nest.

<comment><USER6> It's like the stock phrase "we use your data in ways including ..." which, because it doesn't exclude other ways to use said data, makes the whole statement meaningless fluff.

</comment></comment></comment><comment><USER12> While I can see the fun and useful part in collecting this kind of data ("80% of our users use the 'high' setting - let´s improve Gen 2 on that point"), I think more and more companies are losing track of what´s "good and bad" for the sole purpose of improving products. Why not directly ask the customers, make an opt-in or whatever, instead of anonymously collecting this kind of data from everybody. Come on, in the end it´s quite private after all.

<comment><USER13> > Why not directly ask the customers?

As you correctly suggest, "it's quite private" and users don't openly discuss their turn-ons with strangers.

<comment><USER14> Maybe not with open identity, but they surely do discuss. There are lots of mostly non-commercial forums that are full of people discussing their "turn- ons". In most cases I encountered, in a very civilized fashion. Discussions are more technical than one might expect, especially compared to "real-life" discussions about turn-ons, which often end in shame, giggling or bragging. A look at Amazon or other commercial platforms and the customer reviews shows about the same. As long as people aren't forced to show their full name, they are just fine about discussing such matters.

<comment><USER15> Works fine until someone posts your anonymous online survey to 4chan and you achieve... less product-market fit than you anticipated.

</comment></comment></comment></comment><comment><USER16> If it were more clear, the nature of the packaging, and the installation process for any software included/offered with the device, it might be easier to develop an opinion about whether the user was sufficiently warned about the level of scummy behavior they could expect to suffer while using a remote control massage apparatus.

On the one hand, having ripped so many EULA warning stickers, and clicked through oh so many zombie consent rubber stamp dialogs, I'd figure that with enough labeling, and smile-and-nod EULA prompts, the plantiff would be doomed.

But, then again, given the slipshod and middling tendencies toward product packaging and general software hygiene across the adult entertainment industry, I'd be completely unsurprised if they cut corners, and shipped an autorun.inf CD-ROM in a paper sleeve, alongside a vacuum-molded plastic shell inside a scotch-taped cardboard box.

Without understanding the the packaging (which is probably nsfw) I can't really draw conclusions about which direction this case is headed in.

</comment><comment><USER17> In a long distance relationship networking sex toys for remote-control is blindingly obvious and super fun!

</comment><comment><USER18> my goodness. sex toys + internet just gave me a great startup idea in the dating space. oh my. who do i talk to?</comment>


In cancer science, many "discoveries" don't hold up - <AUTHOR> http://www.reuters.com/article/2012/03/28/us-science-cancer-idUSBRE82R12P20120328

<comment><USER2> Heh, I always get downmodded whenever I comment about stuff like this. The crazy thing is that at an 88% failure-to-reproduce rate, this is literally lower than the percentage of studies demonstrating efficacy in psychic phenomena, prayer, acupuncture, etc. I know it's an apples and oranges comparison, but still.

<comment><AUTHOR> There is an increasing number of similar reports coming out; this is probably the worst I've seen so far. This system is corrupt. People don't want to hear that for the same reason that no human wants to hear what goes against their religion.

One of the most shocking facts here is that the researchers had to sign confidentiality agreements promising not to say when they failed to reproduce a finding.

There's also this interesting detail:

 _The most common response by the challenged scientists was: "you didn't do it right."_

That could be true. But it also is precisely the psychology of the witch doctor.

<comment><USER2> "People don't want to hear that for the same reason that no human wants to hear what goes against their religion."

I think a lot of the time people's worldview literally prevents them from seeing what's in front of them.

E.g. there seem to be three types of treatments in medicine:

A) Treatments that will never work regardless of how much you believe they work, like intercessory prayer.

B) Treatments that will always work regardless of how much you believe they don't work, like antibiotics.

C) Treatments that legitimately work but only if you believe they work, which seemingly include many psychiatric drugs, meditation, probably lots of treatments relating to chronic illness, etc..

Despite the fact that (in my humble opinion) this seems to be the most reasonable interpretation based on the evidence, 99% of people literally can't even see it as a possibility because it goes against their worldview in one way or the other.</comment></comment></comment>


Self-taught astronomer captures "shock breakout" phase of a supernova - <AUTHOR> https://www.mercurynews.com/2018/02/21/self-taught-astronomer-makes-monumental-discovery/ <comment><USER2> Discussion here, also (NYT): [https://news.ycombinator.com/item?id=16432462](https://news.ycombinator.com/item?id=16432462)

<comment><USER3> Thanks. We moved the comments there.</comment></comment>


Ask HN: Should I make this tool to open long URLs from terminal with short name? - <AUTHOR> You can read a description here
https://github.com/flipflopapp/rewq-cli/blob/master/README.md
TLDR:-
$ rewq standup
... would open a meetup-standup link... or just
$ rewq
... if its around 11-am, would open the standup link.
$ rewq notebook
... would open your jupyter notebook on GCP or show a list of URLs for all your notebooks.
Add a comment or upvote if you need something like this. <comment><USER2> I think a github gist should suffice demonstrating how to do it in shell. It should be enough to make a small:

#!/bin/bash browser.xyz url.com

and then symlink it into your path or otherwise.

<comment><AUTHOR> Thanks for your advice. I have been dog-fooding myself by using [https://rewq.app](https://rewq.app) and its pretty useful for me. Not sure if the appeal is universal though.</comment></comment>


Mark Cuban's Blog: Apple vs the FBI vs. A Suggestion - <AUTHOR> http://blogmaverick.com/2016/02/18/apple-vs-the-fbi-vs-a-suggestion/ <comment><USER2> He's not wrong, but the FBI is mostly seeking to set a precedent. Anyone that thinks otherwise should read into the topic more and look at the last 6 months of FBI public relations efforts

</comment><comment><AUTHOR> I thought this was an excellent reading of Tim Cook's letter: "Apple is signaling to us that the real problem here is the use of the All Writs Act."

</comment><comment><USER3> this is a very good point. If the chat data is in Telegram, opening up the phone is useless.</comment>


Unofficial APIs - <AUTHOR> https://github.com/Rolstenhouse/unofficial-apis <comment><USER2> Haha the pokemonGo Api! I was in the final stages of a bootcamp right when Pokemon Go came out, and a bunch of us were desperately trying to put ourselves on the map by doing something lit with Pokemon Go. We discovered that the spawns were cycled hourly, so if we could gather enough data we could quite accurately map out every pokemon in the city. Then we came up against not knowing anything about parsing the data we were just yanking back from requests to the API... I think some point in the authentication phase? So we saw that python library, saw that _they_ had solved the problem, but it was using something we had absolutely no idea how to transcribe to Node, and this is like, a bunch of 3 month old freshfaced Javascript devs. Figuring out Python was kinda out of the question (better to focus on pitching ourselves as hardcore Node/Javascript devs in the upcoming job search).

And then, like, three days after we started the journey, someone had not only beat us to the punch, they had done so at a professional level. I don't remember which site it was, but not only did it work perfectly, it didn't require the "crowd sourced" solution to mapping out pokemon that we were counting on. The developer/s had somehow figured out how to just yank all pokemon locations. And on top of that the app was functional, gorgeous, even had its own URL (we were still in the "all our apps are laughinggiraffe.herokuapp.com domains" phase).

All in all, great experience. A nice fresh slap in the face to how much work we had ahead of us, and good fun had anyway.

<comment><USER3> I had a friend that ran some of that software. The trick was to just make a bunch of accounts and just fake them walking all across the map to gather the locations. Basically crowd sourcing it, but with fake people.

The number of fake accounts was a function of how large of an area you wanted to cover and how often you wanted it to update.

<comment><USER4> I remember some really good public sites, but the quality cycled up and down and the Pokemon devs fought back a bit. I used some tool that basically was what OP described, but let me easily self-host a server. At the time I think there was some hack where the server component could fake location, so you'd just send it off to walk a geofenced area and could browse on mobile remotely while playing the game. Ran it off my laptop, then a DO droplet. Good times.

</comment></comment></comment><comment><USER5> > Designed to inspire your next Friday night hack.

I've been hit with some burnout recently, and this is the kind of inspiration I need. Small, fun, short term project to get some juices flowing, as opposed to forcing myself to work on personal projects I currently don't have passion for, but feel I need to work on out of some weird sense of obligation.

Thanks, this is actually a really great help.

<comment><USER6> Upvoted, it's also what eventually got me out of a burnout. Didn't program side projects for a long time (apart from work) and then just started small hackish things for personal use.

</comment></comment><comment><USER7> To find more of these unofficial APIs, Google:

[site:github.com "unofficial" AND "API"]

Or click here:

[https://www.google.com/search?q=site:github.com+%22unofficia...](https://www.google.com/search?q=site:github.com+%22unofficial%22+AND+%22API%22)

</comment><comment><USER8> Domino's Pizza has an unofficial API as well:

[https://github.com/RIAEvangelist/node-dominos-pizza- api](https://github.com/RIAEvangelist/node-dominos-pizza-api) and [https://pypi.org/project/dominos/](https://pypi.org/project/dominos/)

<comment><AUTHOR> That's awesome. I've always wanted to set up my own hardware button to order pizza for fun haha.

<comment><USER9> Also: [https://github.com/ndmckinley/terraform-provider- dominos](https://github.com/ndmckinley/terraform-provider-dominos)

</comment></comment></comment><comment><USER10> Awesome! I was just looking at integrating Omnifocus and Notion to keep better notes and history of tasks, letting Omnifocus focus on just the task management side of the world.

It'd be cool to link up a script that takes a new task in Omnifocus under the right tag, and push a template into Notion for the note taking, and sync a link back into the notes field of Omnifocus for quick access.

<comment><USER11> Notion plan to release an API soon. They included in their pricing plan update yesterday.

</comment></comment><comment><USER12> No offense to the people who built this, but sharing your username and password with random packages on the internet seems like a bad idea, especially for finance apps.

<comment><USER13> The bad idea in this scheme is to not take a look at what the code does, considering these are open-source packages.

<comment><USER14> I agree, but that's not sufficient in an open source software supply chain. You also need to inspect the dependencies and you need to do this every time you pull any new versions.

</comment></comment></comment><comment><USER15> Tangentially related, but I've been working on something for merchant websites (Amazon, Target, Walmart, etc) that you can feed a product url, and get back product information (image, title, price, availability, etc). It takes ~10 lines of code to write a driver for a merchant, and they are fairly stable if written properly.

My goal is to open source this, and allow anyone to contribute new / update existing drivers. Would there be interest in something like this?

<comment><USER16> Please do. I'm tired of going to multiple sites to compare prices.

</comment></comment><comment><USER17> Awesome!

I tried writing a CLI tool for ordering Chipotle, but I ran into some dynamically generated headers, that made it near impossible to authenticate. In the end, I gave up.

Would love to see more examples and see how issues like this can be handled!

<comment><USER18> I've had this come up a few times when doing API snooping, and what I've done is decompiling the Android version (if available) of their app using jadx [1]. You get pretty legible Java, sometimes with Kotlin artifacts, sometimes with obfuscation, but in combination with some MITM snooping you can see how auth/headers/hashes are done. Sometimes you even find internal API endpoints with a security issue or two.

[1]: [https://github.com/skylot/jadx](https://github.com/skylot/jadx)

<comment><USER17> Thanks!

I've used jadx once before to decompile a steamship line app, but it was just curiosity with no end goal in mind. Didn't try it with the chipotle app.

Next project!

</comment></comment></comment><comment><USER19> I wrote a Ruby one for the NBA.com API but not sure if it still works though as I haven't used it in a while (and also slightly embarrassed at some of the code I wrote back then, which I guess is good!)

[http://github.com/FanaHOVA/nba_rb/](http://github.com/FanaHOVA/nba_rb/)

</comment><comment><USER20> "Anything can be an API - if you are stubborn enough."

<comment><USER21> This is distinctly more SFW than the similar aphorism I've heard.

</comment></comment><comment><USER22> I tried playing Final Fantasy XI on a private server for a week, but found the game to involve too much grinding. Then I noticed an SQL injection in their auction house web page, which allowed me to dump prices of items at various times and build a private API. I used this to inform my investment, got quite wealthy and bought equipment for my toon, then quit the game shortly after.

</comment><comment><USER23> Along similar lines, and unfortunately quite out of date at this point(!) but I've maintained a list of Monzo Bank APIs for a while:

[https://github.com/billinghamj/monzo- api](https://github.com/billinghamj/monzo-api)

</comment><comment><USER24> I love the tinder API. A few years ago I was planing to shift to another locality in my city but couldn't figure out where. I eventually decided to move to an area with the best looking women. Used the python tinder API to move around the whole city with GPS coordinates while setting the shortest possible radius and saved profile pictures tagging them with geo location. The end result was a database of geolocation mapped to profile pictures of women in that area.

<comment><USER25> That's really freaking creepy...

<comment><USER26> BRB: Going to pitch some real estate agents with an automated system to add Tinder women with super hot profile pics tightly geolocated to their realestate listings...

<comment><USER24> There are hot women in your area

Here's the data in a spreadsheet

</comment></comment></comment></comment><comment><USER11> Personally I've found using 'private' web APIs to be a bit of a mixed blessing. Having side projects break with no notice is very frustrating, at the same time they're a huge improvement on scraping for ad-hoc tasks.

</comment><comment><USER27> Does using an unofficial API authenticated with someone else (e.g. a customer)'s account count as a violation of the ToS? In other words: who gets reprimanded/sued? The final user or the messenger?

<comment><USER28> Don't all of these libraries require you to provide your own credentials?

I do think this violates their ToS anyways though.

<comment><USER27> I'm sure it would, in some cases at least. I'd be more interested in understanding who gets the blame.

<comment><USER29> The few things I clicked on are scripts/modules you'd run yourself, so they're not really APIs in the commonly used sense, but website-wrappers that let you use the website as if it was an API. In that case, the user and the messengers are one and the same, the developer of the wrapper isn't involved at all in the transaction.

If it was Unofficial-API-As-A-Service, I'm pretty sure both would be in violation for most services. The user at least for sharing their account credentials, the UAAAS provider likely for some thing in the fine print about only being allowed to use the website for the intended purposes. I doubt either will get sued, the user will get their account cancelled and the provider will get their servers blocked and an angry letter from the lawyers telling them to stop.

</comment></comment></comment></comment><comment><USER30> Hacker News also has an unofficial API: [https://github.com/cheeaun/node- hnapi](https://github.com/cheeaun/node-hnapi)

<comment><USER31> It also has an official API: [https://github.com/HackerNews/API](https://github.com/HackerNews/API)

</comment></comment><comment><USER32> [https://github.com/deepanprabhu/duckduckgo-images- api](https://github.com/deepanprabhu/duckduckgo-images-api)

</comment><comment><USER33> If too many people are using the unofficial API for a product, is it right to assume that building a competing product offering a better official API, would be successful?

<comment><USER34> My guess is that the two things are unrelated, at least looking at this list.

The API itself isn't the reason people use the product.

</comment></comment><comment><USER35> That Notion API is pretty slick. His example of using it for task management and dashboards is wild. May have to give that a whirl.

</comment><comment><USER36> Strange they list Coinbase as an "Unofficial API".

The trading API is very much so official, and dates back to the GDAX days.

<comment><USER14> I think you misunderstand what this repo calls an "API".

The Coinbase "API" in this repo isn't the protocol (eg an HTTP REST API implementation), but the 3rd party Python _library_ which speaks the protocol[1].

[1] [https://github.com/danpaquin/coinbasepro- python](https://github.com/danpaquin/coinbasepro-python)

<comment><USER36> I must be lost then.

The python code is an implementation of a program that uses the Coinbase API to make trades, fetch market data, etc.

In my day, we'd call that a Program, Library or an SDK. Definitely wouldn't call that an "Unofficial API".

When I think of "Unofficial API", I think of an API that wasn't intended for public use and is undocumented and supported by the company. Like the Pandora API some music players have reversed... or the Pokemon GO API people are talking about in this very thread.

Coinbase released, documented and supports their API. Anything that uses that API to do things is just a program, or library.

<comment><USER37> Coinbase may have an official API, doesn't mean they support the Python implementation of their API, hence the 'unofficial' as in 'not maintained by the coinbase dev team'

These implementations are there for devs to save time and simply import the API implementation as a module and use already made functions to do the API calls

<comment><USER36> OK, but what you described isn't an API then. It's a library.

The Coinbase team, to my knowledge, doesn't maintain any implementation... making all implementations "Unofficial" in that sense.

I still fail to see how this python code is considered an "Unofficial API".

<comment><USER37> I agree it's a library but these days anything is being called an 'app' it's kind of the same with API and API implementation (library). It makes it confusing

</comment></comment></comment></comment></comment></comment><comment><USER38> Been meaning to do something with the Robinhood one

<comment><USER39> take a look at Alpaca! particularly, the paper trading is a nice and easy way to implement strategies w/no money on the line

</comment></comment><comment><USER40> How does this work? Using scrapping?

</comment><comment><USER41> oh this is awesome! would be great for new data scientists as well

</comment><comment><USER42> From a practicality standpoint, I strongly discourage using unofficial APIs, as tech companies nowadays are very prone to sending out C&Ds. If you have a use case where the official API doesn't suffice, then do not redistribute anything obtained from the unofficial API, and _definitely_ do not attempt to commercialize it.

<comment><USER43> Max remember this is _Hacker_ news. You sound like you're on Nextdoor complaining about the neighbors who are in clear violation of HOA yard maintenance policies.

<comment><USER42> It's a warning to avoid wasting valuable time, speaking from experience.

I used to use unofficial APIs years ago. There's a reason I don't anymore.

</comment></comment></comment><comment><USER44> I'm actually the current owner of this repo!! I started it because I love working with unofficial APIs for fun hacks that improve my life. During college, I had an alert that told me when the Krispy Kreme donuts were fresh built off an unofficial API that promised enjoyable donuts.

If you're interested, I have a newsletter to update you when new repos are added [https://forms.gle/e8nCivpTBNftNtgGA](https://forms.gle/e8nCivpTBNftNtgGA) and to feature interesting stories from the community.

<comment><USER45> Please don't use multiple accounts to promote things on HN. The community feels extremely strongly about this and will bring out the Searzalls and use much less kind words than "using multiple accounts to promote things".

I'm going to leave the submission up because it struck a genuine chord with people, but that's a lucky escape. Normally, the likelier outcome is bannage.</comment></comment>


Woz tells Paul Allen to stop trolling  - <AUTHOR> http://news.cnet.com/8301-17852_3-20059560-71.html#ixzz1LMVQ3ZxQ <comment><USER2> I just lost twenty points of IQ reading that wretched tripe. And Lord knows, I don't have that much to spare. I don't mind people with opposing views, but if you strip the article of its charact assasination and sarcastic tone, there's nothing really there, no insight. You don't learn anything from it or from refuting it.

Bilgewater.

</comment><comment><USER3> "Chris Matyszczyk brings a fresh and irreverent perspective to the tech world in his CNET blog, Technically Incorrect."

I puked a little. This is about the same level of writing as that awfully- named 'NSFW' column on TechCrunch. Damn trolls.

<comment><USER4> So before I came back here to comment I decided to skim a few of his other posts. There's no content. Ever. None.

I suppose what I'm about to say can be construed as a stock phrase, but I mean it very literally: the overall tone and quality of his articles are that of a stereotypical angry teenage blogger (perhaps modulo the author's journalistic knowledge of the tech field).

> _It's like Batman's Robin getting upset with Holmes' Dr. Watson._

Ugh.

</comment></comment><comment><USER5> What a bizarre story—Are they really trying to put a negative spin Steve Wozniak's disdain for patent trolls?

The smarmy sarcasm was practically palpable.

</comment><comment><USER6> I wish the article had gone further. I'm sure Woz had a little more to say on the subject.</comment>


Scaling Down Gracefully with AWS Lambda and HAProxy - <AUTHOR> https://www.contentful.com/blog/2016/04/27/aws-lambda-haproxy-scaling-down/ <comment><USER2> What are the conditions that using HAProxy is preferable over using ELB or in conjunction with ?

<comment><USER3> When you want more control over your load balancing, or you have long lived connections that exceed the connection timeout you can configure with an ELB (RabbitMQ connections, for example; ask if you want deets, we've tried using ELBs multiple times with Rabbit, and always come back to HAproxy).

<comment><USER4> We had issues with internal ELB's for RabbitMQ (the 1 hour idle connection timeout) and the solution ended up being a heartbeat in the clients. Most client libraries have a parameter that will perform a heartbeat at some interval to keep the connection open.

I can't imagine deploying our own HAProxy infrastructure. Sure, it's relatively simple, but the set-it-and-forget-it comfort provided by ELB (not to mention free SSL) is hard to beat.

<comment><USER3> We've seen some really weird ELB behavior in AWS (latency spiking excessively every few hours for seconds at a time, underlying ELB instances having scale down events occur at unexpected times, and so forth), so we use it sparingly for internal microservices.

Running your own HAProxy infrastructure isn't terribly time consuming, but I do devops/infrastructure all day long; I'm biased. If you can and do avoid it, I can understand why.

</comment></comment></comment></comment><comment><USER5> So HA only updates when chef runs (every 15 mins or so)? And when nodes are deleted, I guess something else has to clean them from chef? You'll also have to add these hosts to monitoring config.

I implemented something similar with puppet/mcollective/SQS years back. Poor man's service discovery. Here are some other options that, if you can handle the complexity of running Zookeper (or similar), are probably a bit cleaner:

[http://jasonwilder.com/blog/2014/02/04/service-discovery- in-...](http://jasonwilder.com/blog/2014/02/04/service-discovery-in-the- cloud/)

</comment><comment><USER6> Interesting article. While my company's cloud infrastructure is in its final nascent stages, I will definitely share this article and the ideas therein for basically reloading the HAProxy context w.r.t the proxied backends.

</comment><comment><USER7> How do you ensure that no requests are lost when you reload HAProxy?

<comment><USER8> Soft reload takes care of that for you, sockets aren't dropped.

If you restart, however, everything's dropped.

<comment><USER7> Is that new in 1.6? As of 1.5.11 there was a lot of hacking required to get a true zero downtime reload: [http://engineeringblog.yelp.com/2015/04/true-zero- downtime-h...](http://engineeringblog.yelp.com/2015/04/true-zero-downtime- haproxy-reloads.html)

<comment><USER9> No, he's referring to the soft reload added in 1.5, which the article you linked addresses under "Just Reload HAProxy." As the article points out, it's not quite zero-downtime, but pretty close.

<comment><USER10> Why not drop servers in a way described here? [http://serverfault.com/questions/249316/how-can-i-remove- bal...](http://serverfault.com/questions/249316/how-can-i-remove-balanced- node-from-haproxy-via-command-line)

<comment><USER11> You can down servers or backends over the stats socket, but you can't add them (adding servers requires a reload).

The DNS resolution work that is going into 1.6 releases may lead to a workable approach where you over allocate servers in a backend and then update them to have the right host/port. Last I checked, however, you still couldn't set the port dynamically.</comment></comment></comment></comment></comment></comment>


There is Literally No One Left on Sean Parker's Airtime - <AUTHOR> http://www.kernelmag.com/features/report/6428/there-is-literally-no-one-left-on-sean-parkers-airtime/

<comment><USER2> HN was not impressed a year ago: [https://news.ycombinator.com/item?id=3751893](https://news.ycombinator.com/item?id=3751893)</comment>


Ask HN: Where has IBMs openblockchain gone? - <AUTHOR> According to the article
https://thenextweb.com/apps/2016/02/16/ibm-has-just-open-sourced-44000-lines-of-blockchain-code-on-github/#.tnw_jW0bePrE
IBM has released blockchain related source code as https://github.com/openblockchain but there is none. Has it been moved somewhere else, withdrawn, re-internalized? <comment><USER2> I believe it has become "fabric" under the umbrella of the hyperledger project. [https://www.hyperledger.org/community/projects](https://www.hyperledger.org/community/projects)</comment>


Ask HN: What's Your Preferred CSS Grid System? - <AUTHOR>

I've relied on Bootstrap's grid over the past few years, mostly out of habit, but I recently started exploring other options.  This isn't my area of expertise, so I'm curious how other HNers handle responsive grid layouts.  Thanks in advance! <comment><USER2> To be honest, I always end up coming back to Bootstrap for when I need a grid system. It's not amazing or the best, but it's really consistent and easy to use, and it makes sense.

I'm interested in seeing what other people have to say because I'm not opposed to trying something new.

</comment><comment><USER3> I've been using [http://getskeleton.com](http://getskeleton.com) for my latest side project and it has been working out great.</comment>


'Edward Snowden did this country a great service. Let him come home' - <AUTHOR> https://www.theguardian.com/us-news/2016/sep/14/edward-snowden-pardon-bernie-sanders-daniel-ellsberg <comment><USER2> Will Snowden write a book?

Im curious about an in depth story of his leaks and him. Citizen 4 didn't provide a lot.</comment>


Sears reaches 11th hour deal to stay in business - <AUTHOR> https://www.cnn.com/2019/01/08/business/sears-future-bankruptcy-delay/index.html <comment><USER2> I don't know much about how this stuff works but this whole thing sounds off to me. After six years of Lampert's direction the company is in the hole. Lampert is offering to buy it, at what I assume is a lowest-Sears-could-ever- sell-for price. How can he be so confident he can save the company, if that's what he was trying to do before?

<comment><USER3> There may be more yet more money that can be extracted before it finally closed for real.

</comment></comment><comment><USER4> The bid was rejected, apparently: [https://www.cnbc.com/2019/01/06/sears- rejects-eddie-lamperts...](https://www.cnbc.com/2019/01/06/sears-rejects- eddie-lamperts-bid-to-save-company-will-liquidate-.html).

<comment><USER5> It was initially rejected, this new revised bid was accepted.

</comment></comment><comment><USER6> Just noted the same in the front page post [https://news.ycombinator.com/item?id=18858282](https://news.ycombinator.com/item?id=18858282) that is no longer accurate.</comment>