qr-backup

I made a new project called qr-backup. It’s a command-line program to back up any file to physical paper, using a number of QR codes. You can then restore it, even WITHOUT the qr-backup program, using the provided instructions.

I’m fairly satisfied with its current state (can actually back up my files, makes a PDF). There’s definitely some future features I’m looking forward to adding, though.

What I know about sleep schedules

I’ve had pretty irregular sleep schedules at times, so I have some tricks for making it more regular, or moving it back/forwards. Take everything here with a spoonful of salt. All of these tricks are relatively long term (1-4 weeks) and won’t instantly fix your schedule. Most of them are from experience, with some knowledge backing them.

Also, as a note, I wake up whenever I feel like it (I don’t have a day job). I have used many of these same tricks with an alarm and a day job when I had those, but I might be forgetting some details.

Quality of sleep. First off, make sure the sleep you are getting, is good. I recommend something like a Zeo ideally, because it’s hard to get a subjective feel for how well you’re sleeping. Ultimately, it’s important to you to sleep enough and sleep well. Sleeping at the right times is important to other people.

Quantity of sleep. Get enough sleep. Enough said. If you have a good quality of sleep, you don’t use an alarm, and you’re waking up relaxed, you’re probably fine.

Here are some things I’ve found screw up my sleep schedule and affect my quality of sleep.

  • Caffein affects schedule AND quality. Caffein at 2pm, affected my quality of sleep at 2am. This is something I just COULD NOT have figured out without a Zeo. Quality of sleep is hard to diagnose.
  • Bright/blue light late affects schedule. Use f.lux or a similar program for your computer. Be aware that most programs of this kind don’t actually WORK for your phone–I don’t use a smartphone, personally. Don’t turn on room lights late at night. I find I’m good if I turn lights off about 3 hours before I want to sleep. Turning on lights very late at night (when you’d usually be asleep), even briefly, screws up your circadian rhythm.
  • Light pollution affects quality. Light while you sleep sucks. I sleep next to a big window, and I often get poor sleep based on whether neighbors have their lights on. Or sometimes, I just need to sleep during the day.
    • A sleep mask gives you EXCELLENT quality of sleep, but can screw up your schedule because you don’t get early-morning light–you’ll sleep longer and drift forward.
    • Blackout curtains are like a sleep mask, but worse, because they don’t block light as well and they’re expensive. They could be better if you have light pollution from one window only, and they’re okay in combination with a timer light (see below).
    • Cover any electronics with lights, especially blinking or blue LEDs. I use black electrical tape.
  • Allergens affect quality
    • Air quality massively affected my sleep. I’d wake up with my throat scratchy, but it took a while to figure out it was affecting my sleep. I now use an ionizing air filter. The trick to air filters is that you have to regularly (once a month) clean the prefilter, and replace the main filter every 6-12 months.
    • Itching. Sometimes this was just mold, which other than an air filter there’s not much I can do about, but also make sure to regularly wash your sheets. Food (don’t eat in bed!) or dust mites can make me itchy.
  • Other drugs may affect schedule and quality. When I started on marijuana I found it massively screwed up my sleep schedule. YMMV. Some foods can too, especially before bed.
  • Relaxation level affects quality. If you’re tense (neurotic especially), you’ll sleep poorly. I haven’t done a lot of experimentation with this one, because it comes up rarely for me. Deliberate relaxation and self-love (the hippie kind, not the sexual kind) before bed can give nice dreams, though.
  • Exercise before bed, or working right before bed, affects at least schedule. Both tend to keep me up.
  • Playing videos before bed affects quality. I might RIGHT before, like 2 minutes–I have some maybe bad habits as a bachelor. I think this doesn’t let your brain relax properly, you need more “down” time.
  • Working in bed may affect schedule. As a general tip, it may be better to avoid working or otherwise being in bed during the day, to cue your body that bed=sleep.
  • Nightmares affects quality. Unfortunately, I can’t be much help on this one. I rarely remember my dreams.
  • Depression affects schedule and possibly quality. Depression makes you sleep more, mania makes you sleep less. If like me you become depressed when you don’t get enough sunlight, you can end up stuck nocturnal. A bright artificial light during the day is a partial solution.
  • Having a regular schedule is self-reinforcing. If you regularly go to bed at the same time or wake up at the same time, you’ll keep doing it. Also, you’ll get cranky if you don’t. [A similar principle applies to dieting–if you eat meals at the same time each day, you’ll get a sudden appetite then. If you don’t eat meals regularly, you won’t have an appetite, or will have one only when actually hungry. But for sleep, regular is good]
  • Age. At 20, I needed 12 hours of sleep a day. At 30, I need only 8-10. This varies a LOT per-person, too. Some people just need more/less sleep.

If you want to move your sleep schedule forward, it’s fairly easy. Just stay up later. I have only performed the “roll forward until you’re the right time” operation once, and don’t recommend it. Normally I hit a wall at dawn. Go forward by no more than 1 hour a day, preferably half that, or it won’t stick. If you do it for more than a few days, you’ll feel weird and sleep deprived.

If you want to move your sleep schedule back a significant amount (more than just undoing a recent 1-hour forward shift) I recommend:

  • Do it gradually. Half an hour a day, probably more like 15 minutes. Don’t bother trying to schedule it.
  • Have caffein AS SOON as you get up (within 15-30 minutes, the sooner the better). This moves your circadian rhythm back, and also stops you falling back asleep. Again I don’t use alarms these days, but it’s a great combo to set a schedule.
  • You can try adjusting it by taking small (0.5mg) melatonin supplements before your usual bedtime, if you’ve just drifted forward a bit
  • Make sure you are getting natural light if possible. If you aren’t, or if it’s winter and you want extra help: hook up your lights, especially a sun lamp, to an automated timer so you get bright white light in your room around when you’d like to wake up. This can fix problems caused by blackout curtains.

Finally, I’ll leave you with a horrifying trick I learned while sleep-deprived at my first job after college. To get up while incredibly sleep deprived, set two alarms, about 30 minutes apart. After the first one, hit the alarm, chug significant portions of an energy drink on reflex while mostly asleep, then immediately fall back sleep. On the second one, actually wake up–the caffein will help keep you awake.

OK-Mixnet

I made a new cryptosystem called OK-Mixnet. It has “perfect” security, as opposed to the usual pretty-good security. (Of course, it’s not magic–if your computer is hacked, the cryptosystem isn’t gonna protect your data). Despite the name, it’s not really a mixnet per se, it just similarly defends against SIGINT.

A writeup is here: https://za3k.com/ok-mixnet.md

The alpha codebase is here: https://github.com/za3k/ok-mixnet

Let me know if you’d like to join the open alpha. Email me your username and IP (you’ll need to forward a port).