Lincoln's blog

[ Home | RSS 2.0 | ATOM 1.0 ]

Sun, 06 Sep 2015

Wed, 16 Apr 2014

Goals? vs. Systems?

The content of this post is at my new blog on the Svbtle platform. I'm probably going to start posting most stuff there directly, unless this displeases many people (if you're one, please let me know).

posted at: 00:50 | path: /si | permanent link to this entry

Sun, 02 Mar 2014

Why Soylent promises to be a major quality-of-life upgrade

I've spent a week with some friends that I haven't seen in a while. They have been eating a lot of Soylent, a meal-replacement shake for busy people designed using modern understanding of diet and nutrition. So I decided to try replacing one or two meals a day with their homemade Soylent. It's a well-balanced meal, consisting of 40% carbohydrates, 30% fats and 30% protein, lots of fiber and micronutrients.

Here's why I like it: Frequently I find myself hungry and just need to eat something. I either have to leave the building, order delivery, or spend a lot of energy deciding to make food (eggs, a sandwich, or something fancier). Being hungry and having to make this decision multiple times daily is a drain on my attention. If I leave the building I have to pick where to go and brave the weather and it's expensive. If I order delivery I don't get instant gratification and it's expensive. If I make food, I don't usually make very healthy food, and it's a lot of work, especially if you count going to the grocery store and planning meals ahead of time.

Anyway, I do all that work and I don't get anything of value -- I'm hungry a few hours later and experience the same problems. With Soylent all these problems go away. I immediately jump to something very close to optimal along the axes of prep time, price, nutrition AND immediate gratification. And yes, it's not very delicious, but that's a small price to pay, especially considering most of my fast food alternatives aren't particularly tasty either.

My week of eating Soylent once or twice a day has demonstrated Soylent's awesomeness quite thoroughly. The Soylent ran out today and I was disappointed. I ended up procrastinating getting food until I was so hungry that it was distracting from my work. Obviously this is only a week but I am quite optimistic.

posted at: 19:18 | path: /si | permanent link to this entry

Mon, 21 Oct 2013

Automatic reinforcement for positive behaviors

I've never been able to remember to update a to-do list consistently. I used to use them for a few days, usually when I had a particular need to track a lot of things -- but then I would stop using them once I didn't need them, even if other people needed to see my updated to-do list. This happened repeatedly and caused problems at a couple of the companies I've worked at.

When I was a kid, my parents would sometimes buy chocolate Advent calendars for Christmas: starting on December 1, each day you open a little door, and there's a piece of chocolate behind the door. And let me tell you, I never forgot to open that door in the morning, because the sugar reward strongly reinforced the habit. So I figured a neat way to get myself to remember to track the to-do items would be to give myself candy when I updated the to-do list.

I built a candy dispenser that sits on my desk, next to my computer. When I check an item off in Google Spreadsheets, it turns the motor, and an M&M is delivered to the chute. See a video of it in action!

I built it using a Raspberry Pi, which is a $35 single-board computer that runs a miniature Linux distribution called "Raspbian". The device is pretty awesome: it has a display port, an SD card slot, two USB ports, an ethernet port, and a good number of general-purpose I/O ports. It runs lots of Linux applications and has access to the Debian repositories, but I just use Python and an SSH server. It's also physically small -- about the size of a credit card, though since you plug things into it on all sides, it ends up taking up a lot more space than that.

I've used Arduino for projects like this in the past. Arduino is a similar computer-on-a-board, though it's substantially less powerful and flexible -- it just has the general-purpose I/O ports, and you program it using a USB cable, but it doesn't run an operating system. Because of this, the Pi ends up being a lot easier to hack on. Since I wanted to connect it to the internet, it was a no-brainer in this case. (You can get an ethernet peripheral for the Arduino but I didn't bother to find out how it would work, since it ends up being just as expensive as the Pi.)

The other core piece of the hardware design is an actuator of some kind, to dispense the candy. I decided to do this with a stepper motor, turning a wheel with holes in it; see the video for a demonstration. A stepper motor is a special kind of motor. With a normal motor, you just apply power and it starts spinning. But with a stepper motor, you control the electromagnetic coils of the motor with software. This means you have precise control over how much the motor turns.

I had never used a stepper motor before. I got the idea from this similar project by Kathryn McElroy. I bought this stepper motor for the Pi, which came as a kit -- a circuit board plus components to solder. There were about 70 joints to solder, which (I would guess) doubled the total number of joints I've soldered in my lifetime. Despite my soldering inexperience, it worked the first time!

After I got the Pi working and the motor working, it was down to the physical components. Actually, it still is, because all the rest of the design is currently made of paper or cardboard :) I want to redesign it but it's actually kind of a hard problem, figuring out how to make it in a robust way. I would like to prototype it with Lego, and 3d print the wheel, but that's a future post.

If you're interested in the software side of it, I put it together using a bunch of pieces.

First, the stepper motor driver. This code runs on the Pi. It just spins the stepper motor. step.py

Second, the fabric script, enabling me to run 'step.py' on the Pi easily from my desktop. It just copies 'step.py' to the raspberry pi via SSH ('rpi' in my ssh configuration) and runs the script. That way I can easily do 'fab step' and test the device, and I don't have to edit the code on the slow Pi itself. fabfile.py

Third, the 'rewardserver' -- it runs on my desktop and provides an endpoint at http://my-desktop-addr:48001/reward. When anybody makes a URL request to this endpoint, it triggers the fabric script, giving me the reward. This was the easiest way for me to setup the ability for external services to trigger rewards. rewardserver.py

Lastly, any external services that you want to trigger a reward. This stuff isn't checked into the repository, and it depends on the service as to how you want to deliver the reward. For Google Docs, I had to create a Google Apps script attached to my spreadsheet, and load the URL when the cell was edited. Unfortunately this kinda sucks -- Google Apps scripts are incredibly buggy and unreliable and hard to write. So I'm not even going to bother posting the current version of this, though I posted a prior version (which sent me a text) on the Akratics Anonymous list here.

Anyway: you're probably asking if it's actually working. So far, it seems to. I only started this project ten days ago, but I've continually updated my to-do list since then. So results are so far promising but inconclusive. Expect a followup in a few weeks!

posted at: 03:05 | path: /si | permanent link to this entry

Fri, 04 Oct 2013

How to increase conscientiousness

I've been thinking more about conscientiousness recently. Part of it was this Gwern essay, Conscientiousness and Online Education. (Gwern is one of my favorite internet writers; if you haven't checked out his stuff, it's highly recommended.)

Gwern observes that conscientiousness is loaded chock-full of positive life correlates, including lifetime earnings, education, happiness, longevity, and so on. He also hints at ways to increase it -- "there is weak evidence that Conscientiousness can be improved by trying harder tasks. (There is an irony here - it's hard tedious work to develop the ability to do hard tedious work, so how does one start?)"

Well, I have a few ideas on how to start. They are presented in the form of a "choose-your-own-adventure"!

(If you're reading this in an RSS reader, you probably want to read this on my actual website, as there are buttons to press.)

Do you want to increase your conscientiousness?

posted at: 06:12 | path: /si | permanent link to this entry

Sun, 04 Aug 2013

Getting Less Sleep

Why bother to hack one's sleep? The simple answer: "more time" -- but this has all sorts of embedded complexity, so I am going to break it down a bit.

Time is the most important resource we have. We can use time to produce things we want: money (by working a job), friends (by talking to people), well-being (by talking to people or eating), and so on. We also (practically speaking) have a limited amount of time: about a thousand months in a lifetime (though there's some chance that life extension will work and we'll get more months, you can't count on it).

So the number of months seems kinda fixed and it's hard to see how to get more months. But if you drop down to hours, it's easier to see how to optimize things: We rarely feel like we wasted a month, but we often notice wasting hours at a time. If we can waste fewer hours, or do better things with each hour, then we can get more of the things we want out of life. By wasting an hour, I am talking about: procrastination in various forms; sleeping unnecessarily; reading unimportant things; and working on things that aren't important.

OK, so sleep seems like a waste. Sleep less and we waste fewer hours. Win? Maybe, but the obvious problem is that missing sleep might cause us to be less effective with the remaining time. Sleep deprivation leads to all sorts of problems: weird aches and pains, immune system compromise, poor focus when working, and periods of grogginess where I'm completely useless. So we need to strike the right balance, because these effects are definitely bad, and I would pay a lot to not experience them.

It's worth looking at the value of those extra hours. Hours are valued differently for different people, and at different times. The most valuable hours -- the ones I would hurt most losing -- are the ones in the middle of the day, when it's easy to coordinate with people. Evening hours, around 7-11pm, seem the least valuable to me because I don't typically get very much done during that time, and there are a lot of distractions. The early morning would be the next best, followed by the late night. Obviously, this depends on what I'm doing also -- if I'm in a flow state, it doesn't matter what time it is, I want to stay awake another hour to stay in flow.

My Sleep Diet:

Sleep no more than six hours during the night, then take as many naps during the day as I feel like.

I've been doing this sleep diet for two weeks and it seems like a boon. Why does this work for me (so far)? First, it's flexible. I highlight its flexible nature because being able to work straight through flow states is really important, so I can't tolerate a rigorous napping schedule.

Second: I am risk-averse with respect to weeks of my time. I've failed to adapt to Uberman and Everyman 3 (polyphasic schedules), and both adaptation periods were very costly to me. I don't want to pay that cost in the short-term unless it's guaranteed to succeed; I have a lot of work to do in the short term and I can't tolerate long periods of ineffectiveness.

Third: It succeeds in reducing my effective amount of sleep. I used to sleep 7.5 hours or so each night. I've shaved that down to an average of 5.75 per night plus 0.5 of napping, so 6.25 -- that's 1.25 hours per day that I've gained. Mostly this time comes in the morning, so I get up around 7:30 or 8 instead of 9.

Fourth: It succeeds in reducing my midday, post-lunch sleepy periods. I think the main reason is that I usually get a nap before midday, and that revives me during the midday hours. The naps are working; I get at least a couple minutes of REM in most of my naps, though I rarely get a lot of REM.

Just a couple notes on my experience: I've tried polyphasic before so I know what it feels like to be sleep deprived. I don't generally feel sleep deprived at all. There were a couple times in the last week where I felt sleep deprived for ~30 minute-1 hour periods, usually in the morning or right after a nap. I haven't gotten that in about five days, though, so it seems to have gotten somewhat better.

I'm taking melatonin each night right as I get into bed. Gwern suggests that melatonin may help him need less sleep, so I've tried it. It seems helpful but I'm not sure. Overall, it was easy to get on this schedule. My original goal was to do it for two weeks, but now I don't see any reason why I can't keep doing this schedule indefinitely.

posted at: 06:39 | path: /si | permanent link to this entry

Tue, 16 Jul 2013

Useful self-improvement interventions

Someone asked me what my best conscious self-improvement decisions have been.

Here's a list, and why I think they helped:

Lifting weights. It's great exercise, it's way more fun than running on a treadmill, and it makes me more attractive and confident and proud of my body, and I think it even improves my posture. This one is easy to see why it's awesome.

Training conscientiousness. I wrote about this a couple years ago. Simply put, I realized that "actually doing things" / "making sure things got done" was a skill I wanted, didn't have, and could train. Those skills and that attitude has stayed with me. For example, I used to make promises like "I'll send you an email" and rarely follow through. Now, when I make a promise like that, I take a small step (adding a reminder, writing a note on a scrap of paper) which will cause me to actually send that email later. Or, I used to tell myself things like "I won't say things that piss off my friend," but the next day, in an angry mood, say one of those things. Now, when I say things like that, my reaction is to ask myself "Is that your real goal? Why haven't you achieved it before, and what is actually going to change this time?" The result is that I actually achieve the things I say I will achieve, and instead of just talking about stuff, I actually do stuff.

Habit training skills. Realizing that most actions that people do are habitual, then realizing that habits are trainable. When you want a certain habit, the typical strategy is to find an existing hook in your life to attach it to. Then you have to notice the hook the first few times, before it becomes habitual. I've used this technique to train brushing my teeth in the morning, for example. In order to make the habit easier, you choose something that takes almost no effort at first -- you just have to remember to do it. Then you can ramp up the difficulty once beginning the action is automatic.

You can go one step farther, though: you can practice the habit offline (before you need it). Example: I want to stop biting my fingernails, so I replace that habit with a harmless one of "nice hands" -- clasping my hands and smiling. The problem is that I never notice biting my fingernails until it's too late. But for 20 minutes I practiced moving my hands near my face and immediately doing "nice hands". I only learned this technique a week ago but I have reduced my fingernail-biting by ~95%, and noticed every time that I was doing it, and I expect this to improve to completely kicking this habit.

posted at: 14:17 | path: /si | permanent link to this entry

Tue, 09 Oct 2012

Zeo numbers for a week of polyphasic sleep (Everyman 3)

I tried polyphasic sleep back in 2006. After about 60 hours of pain, I gave up. I recently encountered some friends for whom it appeared to be working, though, and so I decided to give it another go last week.

In '06, I was attempting the "Uberman" schedule, six 20-minute naps in a day with no core sleep. Uberman is reportedly much more difficult to adapt to than the schedules where you get a night's sleep, and my friends were on Everyman 3, so I tried it as well. Here, you get 3-3.5 hours of core sleep and take 3 20-minute naps during the day.

This time, I stayed on the schedule for a week. Long enough to determine that the road to adaptation was longer than I could tolerate. On day 7, things were not getting better. They were getting worse. My feeling of sleep deprivation started on day 2 of the schedule and remained through the whole thing.

Would this possibly work if I could stand the level of sleep deprivation required to adapt successfully? Possibly. However, I was incredibly unproductive during most of my time while sleep deprived. On some days I couldn't code at all; on others, I could program, but only an hour or two. I judged it unlikely that I would ever recover the hours lost during the adaptation period, even if I did successfully adapt. And it was so incredibly painful, being sleep deprived with nothing I could do.

Anyway, here's my Zeo data.

As you can see, I was REM deprived by maybe 90 min/night while on the polyphasic schedule, while my deep sleep hours hardly changed. I didn't use the Zeo for most naps, but when I occasionally napped with the Zeo, it usually reported 7-11 min REM per nap. Even if I was getting 20 full minutes of REM sleep per nap, that would still only make up 60 minutes per day, not 90. Now, it's arguable whether I actually need those 150 min REM per night, but considering that I also felt sleep deprived, I suspect that it was a real problem.

posted at: 05:12 | path: /si | permanent link to this entry

Sat, 04 Feb 2006

Polyphasic is no more

Yeah, like everyone else who's tried polyphasic, we've given up. (See the post below for more information on polyphasic sleep). We gave it up last Sunday; it was too painful. We did go for like 60 hours without "real" sleep, but it was too annoying. Chalk one up for the bad guys. :(

I still think the theory could work -- that while REM sleep doesn't normally come during the first half hour, your brain could learn to get it during that time. But I don't have the endurance to make that happen now.

posted at: 21:06 | path: /si | permanent link to this entry

Sat, 28 Jan 2006

Polyphasic sleep

Yesterday I was reading on Slashdot about different sleep patterns besides sleeping 6 to 8 hours a night. Doug and I are experimenting with polyphasic sleep -- a pattern where you take frequent "naps" at regular intervals during the day. We've decided to sleep for 30 minutes, then stay awake for 3.5 hours, consistently.

We've only had one night so far. It was painful, staying awake between 4:30 and 8am, when everyone else was asleep, but we pulled through it, and now it's light outside and we're awake again. Supposedly it's tough for the first 3-5 days, but after that, if we stick rigidly to the schedule, it'll become easier. There's a blog of some guy who had great success, Steve Pavlina.

Anyway, we're sticking to our schedule so far. As of this writing, we've had three naps, and they have been on-time within five minutes. We both go to sleep very quickly after putting our heads on the pillow, which is apparently a good sign. I'm excited for this -- it's really cool, and it has great potential.

posted at: 18:10 | path: /si | permanent link to this entry