# Technology’s Infestation of my Life

Examples of how technology has permeated every single bit of my life.

## CrashPlan Keeps Crashing

I had an issue where CrashPlan kept on crashing on Mac (OSX 10.8.4). The CrashPlan launch menu bar would also fail to show, and even when I started it manually, it would only stay active for no more than about 60 seconds before crashing again.

I thought the issue was related to my version of Java, but upgrading to the latest version did not solve the issue.

I finally came across a helpdesk article from Pro Backup, which uses the CrashPlan engine:

In some cases a large file selection (>1TiB or 1 million files) can cause CrashPlan to crash. This can be noticed by continuous stopping and starting. You may also see the CrashPlan application and System Tray icon disappearing in the middle of a backup. Or the main CrashPlan program will run for about 30 seconds then close down with no error message.

The CrashPlan engine by default is limited to 512MB of main memory. The CrashPlan engine won’t use more memory than that, even if the CrashPlan engine needs more working memory and the computer has memory available. When the CrashPlan engine is running out of memory it crashes.

The issue was that as a heavy user, I backup more than 1TB of data. However, CrashPlan only allocates 512MB of memory in Java, which is insufficient for my large backup size.

1. Stop the CrashPlan daemon:
sudo launchctl unload /library/launchdaemons/com.crashplan.engine.plist
2. Edit /library/launchdaemons/com.crashplan.engine.plist and change -Xmx512m to -Xmx1024m (or whatever is needed).
3. Restart the CrashPlan daemon:
sudo launchctl load /library/launchdaemons/com.crashplan.engine.plist

Problem solved!

0

If you’re missing me on Facebook, don’t worry, I didn’t unfriend you. About two weeks ago, I left Facebook. This is something that I’ve been wanting to do for a while, but could never bring myself to do — until two weeks ago.

I’m not sure if this is a forever move, or just short-term.

I’ll still be here and there.

0

## Introducing AFdN.me

Spurred on by the coolness1 that Viper007Bond (aka Alex Mills) enabled with his v007.me site-specific URL shortener, I have also implemented a similar functionality, also using YOURLS.

a-n-d-r-e-w-f-e-r-g-u-s-o-n-.-n-e-t is 18 characters. I’ve managed to reduce that down to a mere seven (a 61% reduction in effort). http://afdn.me is primarily designed to serve at the short URL location and branding for AFdN. This will primarily be seen in social media, such as Twitter, but could also show up in print locations where space may be limited.

Instead of showing a link similar to wp.me/p4tPz-2cP (as shown above), links to AFdN will now appear similar to afdn.me/mg3sm. All previous short URLs will, of course, to continue to function. Only new posts (and old posts that have been edited) will see the new shortened URLs.

The self-referential nature of using AFdN.net did occur to me, but the domain was already taken.

This has also been rolled out for AndrewAndRachel.com, which uses http://aandr.us as its shortened URL.

0
1. Honestly, the real reason I implemented this is that http://andrewandrachel.com/wedding/photo-booth is too long to put on a photo strip branding logo

## Setting up OpenMediaVault

I hope everyone had a merry Thanksgiving! I spent some of my time setting up OpenMediaVault on an Acer Aspire 3610 that my Kolby gave me. It’s a pretty small machine, running an Intel Atom 330 1.6 GHz with 2 GB of RAM1, but I think it will be perfect for running my new NAS!

I’ve been dreaming of a NAS for some time, I’ve contemplated building one for at least two years, but could never justify the cost. What makes this different is that it doesn’t require any new outlay for equipment–I’m literally using what I have already!

I settled on OpenMediaVault because it was based on Debian, which I have more experience with2.

Here are some configuration tricks I need to use in order to get it to work How I Like It™:

# CrashPlan

I use CrashPlan on my laptop and it’s great3! If you don’t have a backup plan, you need to stop reading and get one now. Seriously. What would you do if your computer was stolen, or the hard drive went kaput, or you accidentally deleted something? I want to make sure that data my NAS is storing is just as safe as the data on my laptop.

There’s a guide over on the OpenMediaVault forums which basically echos the official CrashPlan Linux installation guide. Everything went okay until I tried to launch the desktop client and I couldn’t get X11 forwarding to work. I was eventually able to get a headless client to run from my laptop connected over a tunneled SSH, but I didn’t want to have to muck with the ui.properties files every time I wanted to check on things. I also wanted to be able to run both my client and the OMV client simultaneously. So I went back and did some more work on the X11 issue and here’s what I found needed to happen:

For the purposes of this, the IP address of the OpenMediaVault server is 172.16.131.130

ssh root@172.16.131.130


Note, if you get a ssh: connect to host 172.16.131.130 port 22: Connection refused, you need to enable SSH via the OMV online console first!

Prerequisites:

apt-get update
apt-get install xorg
echo "X11UseLocalHost no" >> /etc/ssh/sshd_config
/etc/init.d/ssh restart
apt-get install openjdk-6-jre


Install CrashPlan

cd /tmp
tar -zxvf CrashPlan_3.4.1_Linux.tgz
cd CrashPlan-install
./install.sh


Answer yes to install installing Java, and answer all the other questions as required. If you just press return, the defaults will work just fine (and that’s what I used).

Log out and back in with X11 forwarding enabled, then run CrashPlan:

exit
ssh -X root@172.16.131.130
/usr/local/bin/CrashPlanDesktop


Give it a few seconds and you’ll see that familiar CrashPlan green.

Other notes:

• It was helpful to debug with ssh -v
• Looking through /usr/local/crashplan/log/ui_error.log was the key to understanding that the version of Java downloaded by CrashPlan was throwing errors (such as java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3448 or swt-pi-gtk in swt.library.path) and needed to be updated.

# HFS+

I have a couple of drives that are formated in HFS+ that I wanted to use without having to reformat them. As a side note, I think NTFS is probably the best bet for multisystem compatibility when the potential for dealing with files larger than 4GB. A comment on the OMV blog by norse laid the basic ground work, but I also had to pull some information from Raam Dev’s blog about configuring HFS for Debian.

Note: hfsprogs 332.25-9 and below has a bug where “[f]ormatting a partition as HFSPLUS does not provide the partition with a UUID.“. The work around is to boot to OS X and use the disk utility to format the partition, but this doesn’t work as well when you’re using a VM. The solution is to use the unstable 332.25-10 release of hfsprogs.

echo "deb http://ftp.debian.org/debian testing main contrib" >> /etc/apt/sources.list
apt-get update
apt-get install hfsplus hfsprogs hfsutils
sed -i '$d' /etc/apt/sources.list apt-get update  Then modify /var/www/openmediavault/rpcfilesystemmgmt.inc to be able to handle and mount HFS+ disks: 48c48 < '"jfs","xfs","hfsplus"]}, --- > '"jfs","xfs"]}, 118c118 < "umsdos", "vfat", "ufs", "reiserfs", "btrfs","hfsplus"))) { --- > "umsdos", "vfat", "ufs", "reiserfs", "btrfs"))) { 664,667d663 < break; < case "hfsplus": <$fsName = $fs->getUuid(); <$opts = "defaults,force"; //force,rw,exec,auto,users,uid=501,gid=20";


Finally, you may need to fsck your HFS+ disk if it’s being stubborn and mounting in read-only mode. With the partition unmount:

fsck.hfsplus -f /dev/sdaX


# WiFi

Getting WiFi to work took me down a rabbit hole that ended up being unnecessary. First, verify which Wireless you card you have. The easiest way to do this is using lspci:

apt-get install pciutils
lspci | grep -i network


You should see a line like:
05:00.0 Network controller: RaLink RT3090 Wireless 802.11n 1T/1R PCIe

Installing the RT3090 is pretty straight forward:

echo "deb http://ftp.us.debian.org/debian squeeze main contrib non-free" >> /etc/apt/sources.list
apt-get update
sed -i '$d' /etc/apt/sources.list apt-get update  Edit /etc/network/interfaces to add the following: auto wlan0 iface wlan0 inet dhcp wpa-ssid mynetworkname wpa-psk mysecretpassphrase  Note: the Debian guide recommends restricting the permissions of /etc/network/interfaces to prevent disclosure of the passphrase. Then run: ifup wlan0 That’s all I have for now, I’m working on some methods for backing up other data to the NAS (such as my web site and GMail) which I’ll write up later. 0 1. we tried using it to stream the Olympics, but it wouldn’t even do that very well, but I think that was due to the nVidia chipset not playing well with Ubuntu 2. FreeNAS and NAS4Free both being based on FreeBSD 3. I previously use Mozy, but they started charging by the GB, which wasn’t going to work for me ## Physical Face Cloning The most interesting thing was how they used physics simulation of the materials to determine and optimize the material geometry and actualization parameters for the servos. The result: cloning a real humans’ face onto an animatronics figure. The top comment is perfect as well: mas8705: Soï»¿ Disney is Skynet. You would think we would have seen this sooner… 0 ## Not All Pixels Are Created Equal Whenever I help friends and family buy a new camera, they almost always turn to pixels as the dominating trade point. The reality is, that’s probably not the most appropriate measure of “bestness” and here’s why: The metric most often used by camera manufacturers and marketers to tout their products has been pixel count. That’s a shame, but it was probably inevitable — it’s easy to measure, and consumers are used to the idea that more is better. However, the number of pixels is a measure of quantity, not quality. This is a great article explaining in a mostly non-technical way why pixels aren’t all they’re cracked up to be. Case in point: I can (and have) print a 30″ x 20″ from my eight-year-old 6.1 MP Nikon D70 that look great because it has a 23.7 mm Ã— 15.6 mm1 sensor. If I were to print a picture at the same size using my year-old iPhone 4S with its 8 MP 4.54 mm x 3.42 mm2 sensor, it would look very noisy. 0 1. 369.72mm2 2. 15.52mm2 ## Lifecycle Costs of Lightbulbs Scientific American had an article on the costs of light bulbs1. I wanted to figure out a way to fairly compare the rough lifecycle costs of the bulbs to the consumer. I figured the best way to do that would be to determine the cost per an operating lux-hour. We’re going to figure out the cost to buy and operate lights that emits 1600 lumens for 20000 hours $(3.2 \times 10^{7} lm \mbox{-} h)$ given that energy costs $\0.085\ kWh^{-1}$2: Traditional Incandescent Cost of energy: $\frac{100 W}{1600 lm} = 0.0625 W \cdot lm^{-1}$ $0.0625 W \cdot lm^{-1} \times \0.085 kW \mbox{-} h^{-1} = \5.313\times 10^{-6} lm \mbox{-}h^{-1}$ $\5.313\times 10^{-6} lm \mbox{-} h^{-1} \times 3.2 \times 10^{7} lm \mbox{-} h = \mathbf{\170.00}$ Cost of bulbs: $\frac{\0.37}{750 h} = \4.933\times 10^{-4} h^{-1}$ $\4.933\times 10^{-4} h^{-1} \times 20000 h = \mathbf{\9.87}$ Total Cost: $\170.00 + \9.87 = \mathbf{\179.87}$ You can do the same math for the rest of the bulbs (substituting the proper numbers in) to get a chart that looks like this: Traditional Incandescent Halogen Incandescent Compact Fluorescent (CFL) LED Watts (W) 100 77 23 20 Lumens (lm) 1600 1600 1600 1600 Cost/bulb$0.37 $1.59$2.23 $45 Life span (hours) 750 1000 10000 20000 W/lm 0.0625 0.0481 0.0144 0.0125$/(lm-h) 5.313E-06 4.091E-06 1.222E-06 1.063E-06
Cost to run $170.00$130.90 $39.10$34.00
$/h 0.493E-04 1.590E-04 2.230E-04 2.250E-04 Cost to buy$9.87 $31.80$4.46 $45.00 Total cost$179.87 $162.70$43.56 \$79.00

Here’s the thing I found amazing: there’s a big push to implement LEDs, probably because of the ‘cool’ factor. However, they don’t save that much more energy over CFL — about 13% — and they cost almost twice as much to operate right now. Manufacturers are going to have to have to drop the cost of LED lights a lot in order to make a change worth it…or the government will have to ban mercury in lights3.

Graphic by George Retseck and Jen Christiansen
Sources: U.S. Department of Energy and Efficacy calculations based on currently available bulbs (traditional, halogen and compact fluorescent); SWITCH LIGHTING (led)

0
1. How to Buy a Better Lightbulb, John Matson, Scientific American, January 6, 2012

2. CFLs contain about 4mg of Mg, per Energy Star

## Foiled

The printer was hole-punching my printouts at work (on the wrong side of the page, to boot). I was mystified by why it was doing this.

I tried changing the print settings.
I tried restarting my computer.
I tried restarting the printer.
I tried uninstalling and reinstalling the printer driver.
I tried that rain dance I learned middle school.1

Nothing worked.

I went to call the help desk, expecting the agony of having to cater to their pedantic troubleshooting guide. I started to imagine what they might ask me, and began to mentally reply to their invisible questions, “Yes, I did that… Yes, I tried that… No, that didn’t work either.”

I was dreading the thought of another 30 minutes wasted. I decided to get one more data point by verifying with my coworker that he had the same issue.

His words of wisdom: “Oh, the printer must be loaded with the wrong paper again.”

“The wrong paper? Again?”, I thought to myself.

I quizzically walked back to the printer and furiously opened all the trays in an attempt to locate the non-compliant source.

And there it was. The paper punched for a three-ring binder.

0
1. I made this up, but I should have tried it

## Napkin Analysis of the Sand Flea Jumping Robot

I shared this video1 with Peter, who then asked:

I saw that a couple days ago. Awesome! And has some cool practical applications. I [couldn’t] quite tell if the pitch of the robot was adjustable by the user, or of it always jumped in the same direction. Did you get a sense for that?

It was a good question and one I didn’t have an immediate answer to.

I would actually guess that I don’t have immediate answers2 to at least 50% of questions people ask me3. I have to do some amount of thinking, and sometimes even some research. I think people tend to think I know the answer off the top of my head, I assure you: I am not that smart.

I do have an inquisitive mind, I do know where to look, and I do know how to ask the right question.

I decided to remedy this question though by talking it through, instead of just giving an answer. This is basically my thought processes as it occurred. Except that I got Sin and Cos mixed up and didn’t realize it until I had finished my conclusion. So I had to redo my entire analysis, and that’s what you see here. Please note this is still really just a paper napkin answer:

As far as angle, I’m not sure. I suspect there would be some angle change.

Elevation angle can affect two things, how high it goes and how far it goes forward, and these two things are intrinsically linked through SohCahToa. Height and forward distance can also be affected by the force applied (ceteris paribus4). This gives a problem with two independent input variables (angle and power) and two dependent output variables (height and forward distance/range).

Since my primary goal is to jump, I’m going to put most of my energy into that. If I want to jump higher, I can either apply more force or make my elevation angle higher (as long as it’s < 90°). As the elevation angle nears 90° $\left (\frac{\pi}{2} \right )$, more of my energy goes into going up than going forward. The proportion of energy applied to going up is defined by Sin and the proportion of energy applied to going forward is defined by Cos. Also worth remembering is that the Sin[x] + Cos[x] is not a straight line, it's another parabola that peaks at 45 degrees. The biggest bang for your average buck is to angle yourself at 45 degrees and shoot. Additionally, Cos (forward) angles that are near 90° have a high rate of change (i.e. going from 80° to 81° has more of a difference than going from 10° to 11°), thus little changes in elevation angles near 90° have relatively larger impacts on how far forward I go. Conversely, Sin (height) angles that are near 90° have very low rates of change. The cross over point for rates of change between Sin and Cos is - you guessed it - at 45° . Since the goal of the robot is to jump high (not far), it would make sense to only use high angles (above 45° ). To vary height significantly though, you are going to have vary power. Going from 46° to 90° only increases height by ~93% if the force remains the same. In comparison, going from 1 degree to 45 degrees increases height by 164,000%. Math is great, but if you can't implement it, it doesn't matter so let's turn to what's practical: One of the underlying assumptions is if the robot can vary the force it uses and if it could accurately set it's elevation angle. Setting the angle is pretty easy using encoders, and accelerometers to determine which way is down (if you were jumping from an angled surface, for instance). We've also already seen that the jumping leg can move, so adding functionality for precision angle measurements (within a degree, let's say) is pretty trivial. The real question, I think, is how does it jump? Delivering energy quickly has always been a problem. Delivering a measured amount of energy quickly even more so. Based on jumping from the ground to the loading dock (1.5 meters in height at most) and then from the loading dock to the roof (probably at least 4 meters), that's about a 166% increase in height, which is not quite enough as could be accomplished by just varying the angle from 46° to 90°. Since you can't gain that height just by altering the angle alone, it makes sense to assume that the jump force setting can be altered. However, if you change the jump force setting, what does that do to the forward movement (we know it will make the robot jump higher)? It will, of course, move the robot forward even more. How much more? I don't know exactly, but probably enough to make some minor angle tweakage worth it. We would have to sit down and work on the math to verify the exact amount. I think it involves something with squaring the derivative of the force divided by the mass. Squaring always make numbers bigger, so I tend to think it would be significant. Suffice it to say, if you don't want to proportionally more forward when you jump significantly higher, you would have to adjust your jump elevation angle. Thus I would assume there may be small changes in angle elevation, but that's hard to estimate given the view-point the videos were shot at. It's also pretty easy to solve for power required and angle needed to reach a particular height while moving forward only a certain amount (once you figure out what the maths are), so at least the implementation factor is pretty easy from a computing standpoint. And I've spent way to much time on that answer.5 As always, please check my work.

0
1. answers that only involving recalling a specific outcome

2. I just made that number up, really

3. all other things being equal or held constant

4. One of the reasons I decided to blog about it, the work was pretty much a sunk cost