Sunday, August 23, 2015
Netflix not sending DVDs reliably
being useful -- sending us DVDs before we've sent back the old DVDs.
But in practice, we're sometimes not getting DVDs we're supposed to
get.
The problem is that we have multiple DVD queues, one for items that my
wife Catie picks, one for items that I pick. We have one DVD
allocated to Catie's list, and two to mine, since we both watch
through mine a lot faster. Catie sometimes doesn't watch her DVDs for
a while. When Netflix sends extra DVDs to one queue, they sometimes
don't send DVDs to the other queue until the extras are sent back. So
if Catie has an extra DVD on her queue and doesn't watch it, then I
might not get one of my DVDs. And if she has two extras, then I can
stop getting DVDs altogether. This isn't how the DVD allocations are
supposed to work. It's infuriating.
I've contacted netflix a couple of times to complain about this, but
the customer service folks don't have the ability to do anything about
it. Very frustrating.
Tuesday, November 26, 2013
How I lost 67 Pounds
The short answer: diet and exercise.
The long answer: I had a plan. It started simple and grew more complicated. That plan is below.
DISCLAIMER: I am not a professional nutritionist or a professional physical therapist. This is not intended as advice, but to document what I did to answer others' questions. What worked for me might not work for you.
Disclaimers aside, let's make way for:
Morty's Weight Loss Plan
General weight loss
- The big rule: don't try to do everything at once. Start small and build.
- Don't lose weight too fast. For the first week or two, it's OK to lose a lot of weight, but after that, it should be 1-2 pounds per week. If you're losing weight faster than that, back off. Do less exercise and maybe relax the diet a bit.
- You're not just doing this until you lose weight. If you go back to your old bad habits, you're just going to put the weight back on. The goal here is to make lifestyle changes that will let you lose the weight and then keep it off. And you need to exercise even if your weight isn't a problem. So your mindset should be "what can I live with for the rest of my life", not "what can I live with until I drop the weight."
- NB: you do get to back off a little bit when you reach your goal weight. It's easier to maintain weight than to lose weight. Homeostatic equilibrium, baby.
Eating
- Eat at least three meals per day
- Eat at least 5 items of fruit per day. Usually a banana, two apples (fuji and something else), a pear (bartlett, d'anjou, forelle, or other green pear or red pear, but not packham) and a citrus (minneola tangelo, valencia orange, or other)
- Eat at least one serving of vegetable per day. [Mom would be so proud.]
- Eat at least one serving of fish per day. Canned fish works well. Examples: tuna salad (suitable for work), sardines in lemon sauce, sardines in mustard, smoked trout.
- Watch out: don't bring "stinky" fish to work. Some people didn't grow up eating this stuff. Poor them.
- Avoid starch. That includes bread, potato, pasta, or rice. A little won't hurt, but don't overdo it. (I eventually added a daily whole wheat bagel.)
- Eat at most one "meat" meal per day. The other meals should be just fruit and/or vegetables and/or fish
- Meal idea: stir fry. Use 2 pounds of veggies for every pound of meat.
- Meal idea: grilled steak and grilled veggies
- Meal idea: Maiwand Kebab (21044, by the Safeway, not one of the other ones). Lamb kebab, substitute eggplant and chickpeas.
- Eat fruit and veggies *before* "fun" food
- If you're hungry, eat. If you're thirsty, drink. If you're tired, sleep.
- While eating, pay attention to your hunger. If you're not hungry any more, stop eating. Eat slowly, so your body has time to adjust.
- It's OK not to finish everything on your plate.
- You can eat food that's healthy. You can eat (some) food that's tasty, even if it's not healthy. If the food isn't healthy and isn't tasty, don't eat it! This is especially a problem at restaurants, which tend to bundle "bad" foods with "good" foods. I don't much like french fries, and they are not healthy, so why do I eat them when they are served in restaurants as a side?
- Tricks for dealing with restaurants: "hold" and substitutions. I tend to eat whatever is served to me, even if I don't like it -- I don't want to waste food. So, get them to "hold" it, so it won't be wasted. Or substitute for something healthier. Most restaurants are happy to substitute salad for french fries.
- When eating out, partition your food. Don't eat more than you think you should. Remember, it's OK not to eat everything. The starving kids of the world won't be any more fed if you overeat.
- When you want to drink juice or other sugar waters, drink just a small amount. The best part is the first swallow. Then slake your thirst with water.
- The above works with most tasty+unhealthy food. Ice cream? Have a spoonful, and then eat something else.
- You are allowed to make occasional exceptions. The bread at Maiwand 21044, for example. Just don't do it too often.
Exercise
- "No pain, no pain." If it hurts, stop the exercise or decrease the weight.
- Watch TV on an exercise machine (treadmill, exercise bike.) No TV watching from the sofa unless you are also keeping up with your exercise.
- Never run two days in a row -- intersperse with bike work.
- When you have time, spend extra time walking/biking at low intensity. This helps you lose weight. Keep it slow.
- Split the weights into muscle groups. Do different groups on different days.
- Gradually increase the load over time. I increase one setting per visit, gradually rotating through all settings. Since I use 12 different weight machines, that means I stay at a given setting for about 2 weeks before I increase it.
- Don't increase by more than 5 pounds at a time. For machines that only go up by 10 pound increments, use 5-pound add-on weights.
- If you are scheduled to increase the load but are having a lot of trouble with it, DO NOT increase the load. See "no pain, no pain" above.
- Even if you are scheduled to stay at the same weight you have done before, if you are having trouble with it, decrease the weight. See "no pain, no pain" above.
- Exercise every day if possible while trying to lose weight.
- Missing one day occasionally is OK. Do not miss two days in a row. [When you're done losing weight, you might be able to back off to exercising every two days as a matter of course.]
- High-speed exercise is good for the heart. Low speed exercise is good for weight loss. The border is at a pulse rate of about 180 - $your_age. Above that threshold, you don't burn fat. Do both kinds of exercise.
- Per the above, you need a heart rate monitor. Be sure to get one with a replacable battery.
- Normal exercise sequence: half an hour of swimming followed by half an hour of running/walking or biking followed by weight work.
- Exerise every day. If you can't do every day, do every 1.5 days.
- I try to exercise 7 times in a week. Sample schedule: Monday morning: run, group 1 (abs and arms). Tuesday morning: bike, group 2 (chest, thighs, legs, shoulders). Wednesday: repeat Monday.
- Note that the above was not an all-at-once deal. When I started out, I was just going the running. After more than 5 months, I started the group 1 and group 2 exercised. A few months after that, I started the exercise bike. I phased in swimming about 15 months after I started, then dropped it a few months later.
Thursday, June 6, 2013
Commands: noun, then verb
I fully understand why English-speaking people tend to put the verb first. In English, an imperative order is given verb first. "Insert this module! Delete this directory! Add this apt repository!" So English speaking programmers tend to use the same convention for program names.
Unfortunately, verb-first order breaks command searching via command completion. Suppose I want a module related command, but I can't remember the name. The part I'm most likely to remember is "mod". If it were "modins", "moddep", "modrm", etc., I could start typing "mod" and press <tab> and the various module-related commands would be listed. But if it's "insmod", "depmod", "rmmod", etc., I had better remember the particular verb used as well as the noun.
A related problem is that verbs tend to not be consistent. Why do we "ins" and "rm" modules but "add" and "del" users? The noun part is much more likely to be consistent. Once more, command completion comes to our rescue.
When I did Solaris admin, I was impressed that all their module commands started with "mod". I'm happy to note that people in the Linux world now mostly seem to get this as well. The early Linux module commands were "verb-noun" ordering, but the newer module commands are "noun-verb" -- "modprobe", "modinfo". Similarly, the early "user" commands were "adduser" and "deluser", but the modern equivalents are "useradd" and "userdel". Yay for progress!
[And now I have a reference for when I need to argue with someone on why they should rename their program! Yay me.]
Monday, May 6, 2013
Android configuration
- settings
- security
- unknown sources: allow
- screen lock: pin
- automatically lock: 5 minutes after sleep
- power button instantly locks: off
- owner info: enter name and email
- verify apps: enable
- backup and restore
- automatic backup: enable
- automatic restore: enable
- security
- accounts:
- dropbox
- Mantano (now expired)
- netflix
- outlook web email
- skype
- tivo
- ADW (ADVANCED)
- actionbar: don't show
- dock: rotate with device orientation
- desktop position: ICS slider
- app drawer: ICS paginated
- transitions: normal scroll
- ADW Settings
- screen
- desktop columns: 5
- desktop rows: 7
- system
- advanced settings
- home orientation: portrait
- advanced settings
- screen
- desktop setup
- icon row:
- phone
- beyond podcast
- chrome
- reader
- row: 1 (from bottom)
- power toggles icon (see below for details)
- widget beyond podcast 1x1 icon
- row: 2 (from bottom)
- widget connectbot frakir.org
- maps
- winamp
- folder
- google+
- play store
- row: 3 (from bottom)
- folder
- mantano reader lite
- AEPreader
- aldiko premium
- eReader Prestigio
- ZXReader
- HaTaNa"Ch
- OurGroceries
- folder
- Angry Birds
- Angry Birds seasons
- Bard's Tale
- Defender II
- Minecraft PE demo
- Sudoku
- folder
- MX player
- Music
- Mythfrontend
- netflix
- pandora
- tivo
- folder
- Gmail
- Messaging
- Outlook Web Mobile
- People
- Skype
- Talk
- YAIIC
- folder
- row: 4 (from bottom)
- folder
- Clock
- StopWatch and Timer
- Navigation
- folder
- Camera
- Camera MX
- DOF Calculator
- OneShot Cam
- Smart Voice Recorder
- folder
- settings
- ADW Config
- Authenticator
- battery indicator
- BlueAnt
- Downloads
- Dropbox
- ES File Explorer
- Gallery
- Power Toggles
- ROM Manager
- SGS3 Easy UMS
- StickMount
- SuperSU
- Task Manager
- Torch
- Traceroute
- UltraTools Mobile
- Wi-fi Web Login
- folder
- Tricorder
- AK47
- Android Lightsaber
- Android Lightsaber (#2)
- BlueScreen
- Earth
- Google Sky Map
- Periodic Table
- screen Crack
- Sonic Screwdriver
- Sonic Screwdriver (#2)
- folder
- row: 5 (from bottom)
- blank
- blank
- folder
- Barcode scanner
- BMI Calculator
- Chicon7
- DC Metro Map
- DC Metro Transit
- Goggles
- How to Tie a Tie
- Karl's Mortgage
- Local
- MyBMI
- NASA
- News and Weather
- RunKeeper
- Running
- Speed Dial
- The Weather Channel
- Translate
- RealCalc
- folder
- Titanium Backup
- APN Backup & Restore
- Call Log Backup & Restore
- SMS Backup & Restore
- row: 6 (from bottom)
- blank x5
- row: 7 (from bottom)
- blank
- Calendar
- Hebrew Calendar Widget (see below)
- icon row:
- aldiko premium
- settings | display | page turn animation = off
- automateit
- settings
- show popup messages: off
- show service notifications: off
- add rules
- application trigger
- application: map
- actions: composite
- GPS: on (phone only)
- mobile data: on (phone only)
- power connected
- actions: composite
- GPS: on (phone only)
- bluetooth: on
- wifi: on
- actions: composite
- power disconnected trigger
- actions: composite
- GPS: off (phone only)
- bluetooth: off
- wifi: off
- actions: composite
- application activated trigger
- application: MX Player Pro
- action: set screen brightness 100%
- application deactivated trigger
- application: MX Player Pro
- action: set screen brightness automatic
- application trigger
- settings
- AVG
- activate
- battery indicator
- just start it
- call logs backup and restore
- preferences
- backup folder: external card
- schedule backups
- enable
- 4am
- repeat 1 day
- preferences
- connectbot
- set up hacker's keyboard first
- connect ssh to morty@frakir.org
- connect ssh to work
- connect local
- create shortcut widgets for morty@frakir.org
- dropbox
- configure account
- upload phones
- upload existing photos: no
- skip
- email
- settings
- application
- auto-advance: message list
- application
- settings
- ES File Viewer
- settings
- file settings
- show hidden files: yes
- view settings
- view: details
- file settings
- settings
- facebook
- log in
- sync (contacts): Sync all (note: won't be present on tablet)
- settings
- sync photos: off
- messenger location: off
- sync contacts: sync all (note: won't be present on tablet)
- hacker's keyboard
- configure input methods (also under settings | keyboard)
- hacker's keyboard
- enable
- settings
- keyboard mode, portrait: full 5-row layout
- hacker's keyboard
- set current input method (also under settings | keyboard)
- hacker's keyboard
- configure input methods (also under settings | keyboard)
- Hebrew Calendar 3x1 widget
- hebrew date changes at: midnight
- location for candle lighting: enter location manually: 21044
- Language: Hebrew
- minutes before sunset to light candles: 18
- mantano
- settings
- bookshelf
- import folders
- add: /mnt/inbooks
- del: /mnt or other defaults
- import folders
- bookshelf
- settings
- ourgroceries
- send auth request to main acount
- MX player
- settings
- decoder
- S/W decoder (local): yes
- decoder
- settings
- netflix
- log in
- power toggles
- create a widget
- toggles:
- hotspot (wifi)
- wifi
- bluetooth
- gps
- mobile data
- screen lock
- volume toggle
- brightness quad
- transparency: about 50%
- toggles:
- under the app:
- notification widget
- enable
- conigure
- two rows
- row1: as per widget above
- row2:
- flash light
- screen light
- data sync
- sync now
- airplane mode
- play/pause music
- rotation lock
- notification widget
- create a widget
- realcalc
- settings
- RPN mode: yes
- Enable Radix modes: yes
- swap percent and 1/x: yes
- settings
- tricorder
- obtain from your dropbox account
- settings
- sound level: quiet sound
- SuperSU
- settings
- show notifications: no
- clear logs after: never
- settings
- wifi web login
- log in at work
- log in at gym
- root phone (ADVANCED)
- download heimdall, recovery.img, and CWM file CWM-SuperSU-v0.87.zip to linux system
- build heimdall
- copy CWM file to phone external card
- reboot (#1) phone, while holding down buttons: volume-down, power, and home
- at prompt, press volume-up
- you should now be in "ODIN mode" (small print) and "Downloading..."
- on your PC, sudo ./heimdall flash --recovery recovery.img
- watch phone closely! If you miss your window, you will need to reflash until it works
- When it reboots (#2), hold down buttons: volume-up, power, and home
- If you boot into the normal phone OS, you missed recovery mode. Go back to the reboot #1 and reflash.
- You should boot into CWM based Recovery. If you boot into Android recover, go back to reboot #1.
- If you got into recovery mode, congrats!
- In the recovery menu, use volume-up, volume-down, and power to select
- select "install zip from sdcard"
- select "choose zip from sdcard"
- select "firmware"
- select CWM file
- select "yes"
- select "go back"
- select "reboot"
- Upgrading to a different firmware (ADVANCED)
- backup phone apps using Titanium backup
- backup call logs to external SDcard
- backup SMSs to external SDcard
- backup APNs; copy from local SDcard to external SDcard
- backup ADW launcher settings; copy from local SDcard to external SDcard
- download and transfer to phone sdcard:
- desired image
- google apps ("gapps") for desired image
- do usual root steps, up to second boot
- using clockwork recovery:
- make a backup of the system firmware
- wipe previous data
- install image
- install google apps ("gapps")
- reboot
- once booted
- configure wireless
- configure google account
- go to google play
- stop downloads (if they are happening)
- install titanium backup
- go to titanium backup
- menu | batch actions
- restore missing apps with data
- DO NOT: restore missing apps and all system data
- DO NOT: restore all apps with data
- menu | batch actions
- reboot
Tuesday, October 30, 2012
Android Apps
Every now and again, geek chats turn to favorite Android apps. I've been meaning to make a list of mine. Here is that list, starting with the really useful, non-obvious choices first. If you have a great one that I left out, please let me know!
[Note: a few are labelled as requiring root. For these few, if you are not very technical, you may not want to try to use them.]
- MX Player -- video player that is much more flexible than the built-in player. Versions: free (full, ad-supported); pro.
- RealCalc -- scientific calculator. Has support for Radix modes, RPN, and other nifty features. Versions: free (almost all features); pro.
- OurGroceries -- shared list manager. Has clients for Android, iOS, and generic web. Free, ad-supported.
- PowerToggles -- replacement (up to 8 toggles) for the default power control widget. Free. Note: some functionality requires root, but on Samsung, is worth installing even without root.
- ADW Launcher -- replacement for the main interface that comes with your Android device. Will let you increase the number of columns and rows. Very useful if you have a device that limits you in this department. Free.
- BeyondPodcast -- nice podcast manager. Much nicer than Google's "Listen" app. Versions: trial (limited); pro.
- ES File Explorer File Manager -- browse files directly. Free.
- Call log Backup, APN backup, SMS Backup -- free backup apps.
- Mantano Reader -- ereader app, my current preference.
- WiFi Web Login -- automate login to wifi hotspots. Very useful if your work and/or gym wifi requires a login.
More specialized apps
- Connectbot -- ssh client. Free.
- Hacker's keyboard -- replacement Android virtual keyboard. Includes, control, alt, escape, and other useful keys. Free.
- Stickmount -- replacement for USB mass storage support for devices that don't come with. Free. Note: REQUIRES ROOT.
- Speed Dial -- replacement speed dial call list for phones that have a crappy phone app. Free.
- Battery Indicator (Darshan) -- nice battery widget.
- AutomateIt -- automatically change settings and do other actions based on triggers. Versions: free (limited); pro.
- BusyBox -- linux tools. Free. Note: REQUIRES ROOT.
- DOF Calculator (Aimen) -- for photographers to calculate depth-of-field. Has advanced mode that will let you fill in numbers -- handy for, say, shuttle photography. Free.
- Titanium backup -- lets you backup all your apps and setting, e.g. before an upgrade. NOTE: REQUIRES ROOT. Versions: free (limited); pro.
- Google Authenticator -- lets you build two-factor auth systems.
- Google Goggles -- work with barcodes.
- Hebrew Bible -- for looking things up on the fly.
- Hebrew Calendar Widget
- Karl's Mortgage Calculator -- calculate mortgage under various conditions. Free.
- How to Tie a Tie -- diagrams that include the more obscure tie types
- NASA App -- keep track of NASA
- mythfrontend -- watch TV from your MythTV player
- Periodic Table -- yay for chemistry!
- Presto Sound Library -- a "beta" but it costs money. Will let you play your podcasts in BeyondPodcast at faster than 1x.
- Skymap (google) -- nifty astronomy resource
- Stop Watch & Timer
- SuperSU -- manages root access. Note: requires root.
- Task Manager (Rhythm Software)
- Tivo -- control your tivo. Cannot yet stream content from a tivo. Free.
- The Weather Channel -- widgets to track weather
- traceroute (srcguardian)
- UltraTools Mobile -- traceroute and other tools to troubleshoot networks
- Yaaic -- IRC chat program. Free.
- Go Clock Widget
- Antivirus AVG. Free. Not sure if it's worth it. ;)
- Call Your Folks -- reminder to call parents.
- Nike+ Running
- Runkeeper
- MyBMI
- BMI Calculator
Some app equivalents of popular websites and desktop apps. Also apps that tend to come with your devices
- Google Reader -- keep up with your RSS feeds. Unfortunately, limited to 30-day retention. Still one of my most heavily-used apps.
- Gmail -- keep up with your google mail
- Google Calendar
- Google Earth
- Google Play
- Google Play Books
- Google Play Movies and TV
- Google Play Music
- Google Search
- Google Translate
- Dropbox
- firefox
- IMDB -- search IMDB. Sometimes less useful than the website.
- Maps
- netflix
- Skype
- Street View on Google Maps
- Voice Search (google)
- WinAmp -- yes, it's available for Android.
- Youtube
Toys and games (all free except as indicated)
- AK-47 -- toy gun.
- Android Lightsaber
- Angry Birds
- Angry Birds Seasons
- Bard's Tale
- Binary Time Widget
- BSOD
- Defender II -- free to play. After a certain point, upgrades cost money. :(
- Radiant Defense -- free to play castle defence. After a certain point, upgrades cost money.
- ScreenCrack
- Sonic Screwdriver Gadgets
- Star Wars Light Saber
- Sudoku (Frank and Chase)
- Tricorder (not available from the app store)
- X-sonic Screwdrivers
Some apps I no longer use/need
- Power Control Plus -- can have a whole lot of toggles, but can't set GPS even with root and running as a system app.
- Adobe Reader -- I no longer run Adobe software by choice
- Advanced Task Killer (rechild) -- don't like current permissions
- Aldiko -- eReader app. Has problems rendering the covers of some of my books. I've switched to Moon+ Reader.
- Android Tethering -- prefer wifi tethering
- BarcodeBank -- use google goggles instead
- Battery Widget (GeekyYouUp) -- prefer Darshan
- Brightest Flashlight -- prefer the flashlight that is part of Power Toggles
- Color Flashlight HD -- prefer the flashlight that is part of Power Toggles
- Power Control Widget -- a power control widget that can have an arbitrarily large number of controls/toggles. Unfortunately, it doesn't work on my rooted ICS Samsung S3.
- Moon+ Reader -- ereader app. Doesn't paginate correctly.
- Nook -- implements DRM. No thanks.
- Out of Milk -- shopping app. No easy sharing.
- eReader Prestigio -- ereader app. Put an ad in my notification area.
- Racing Live -- free to play.
- Shop Savvy Barcode scanner
Apps that everyone can use
Tips and tricks
Sunday, January 30, 2011
Why hasn't IPv6 been deployed yet?
Compatibility
Effort
No central authority mandating IPv6
Incentive
Hardware support
Application support
Conclusion
Sunday, January 3, 2010
Issues with TCL and Expect
* scope is insane. There is no automatic inheritance of variables
from the global scope. If you want a variable from the parent
scope, you need to declare this by using the "global" keyword.
There are various other kinds of scope you can do, including going
into the caller's scope.
* the language is barely tokenized at all. If there is a basic syntax
bug, the interpreter is likely to not pick up on it until that
particular code path is run.
* There are no forward declarations of functions. If you want to use
a function, you have to define it before you use it.
Issues with expect:
* the documentation encourages people to do "send "$whatever\r";
expect $prompt". In a lot of cases, though, sending $whatever will
result in a prompt regardless of whether it also resulted in an
error or not. This encourages sloppy code. Better guidance might
be "send "$whatever\r"; expect "$whatever\r\n$prompt", because that
checks that the host returned a prompt immediately after echoing
$whatever.
* Bad things can happen under three special error conditions: eof,
timeout, and full_buffer. It would be nice if there were a default
handler for these that threw an exception, to force programmers to
be aware of them. The handler could be an expect_after_after, so if
the programmer tests for them in expect_before, expect, or
expect_after, that test overrides. It might be triggered by a
special syntax (i.e. expect_sanity or something) so as to avoid
problems with backwards compatibility.