Reducing Tracking

December 13, 2013 6:52 pm

As a software developer and particularly a web developer it is my responsibility to set a good example and try to be a force for good.

As of today, none of my sites use Google Analytics anymore.  The tipping point, aside from improving general web privacy, was that the NSA is supposedly hijacking the Google tracking data for their own purposes.

While I don't really need any analytics, I do get curious as to what kind of traffic my websites are getting.  So I instead stood up my own instance of Piwik.  This is a self-hosted analytics solution.  Now my websites simply report to another one of my systems when they're accessed (instead of Google).  And I know that my Piwik installation respects the "Do Not Track" setting you can use in your browser (I've tested it myself).  Also, my Piwik analytics won't track you all over the Internet.

I realize this may seem a little silly coming from a blog hosted on Google's servers via Blogger, but I'm also working on that.  I'm looking into using Habari and migrating this blog to be self-hosted as well.  Given that Blogger seems to be a dead product in Google's eyes (little to no updates or changes in many, many months), it's probably better to get off it anyway as it may get shut down at some point.  However, I'll probably wait a few months until the more stabilized Habari 1.0 release is finished.  Such a move will probably coincide with standing up a family cloud using ArkOS and OwnCloud.

It's not that I'm particularly paranoid, but the various pieces of software are reaching a point where for someone like me, it's not particularly difficult or burdensome to self-host things.  So I might as well do it and encourage an Internet model closer to its original design: interacting, decentralized systems.  A model which is harder for any one organization (government or otherwise) to infiltrate, break, or commandeer.

Testing LED Christmas Lights

December 8, 2013 3:49 pm

The icicle lights we have are LEDs which is nice because they use incredibly little power and should last a long time, but has the drawback that they're slightly harder to diagnose when they misbehave.

Once I was recovered from my various maladies I pulled out the 10 strands we have to get them up on the house (starting last weekend).  One of the strands wouldn't light so I got to play the fun game of tracking down the problem.

So I started with the obvious of checking to make sure no "bulbs" (I'll say "bulb" because it conveys my meaning even though there are no actual bulbs) were missing.  And I tested the other end of the strand and was getting a solid 120V connection, so I knew the wiring was still good.

[Edit: Individual bulbs can fail like normal and have a shunt which will allow the rest of the strand to stay lit.  These bulbs are easy to find and replace (they're the only bulb unlit).  The problem I explore in this post is a bulb where the leads are broken so the power didn't make it to the shunt in the first place.]

But once you have to go beyond those steps some of the common troubleshooting techniques won't work on LED strands.  I started with my multimeter that contains an inductive AC voltage detector ("no-touch").  Since the bad bulb breaks the circuit, traditionally you can use a voltage detector to find where the circuit breaks.

Unfortunately, for whatever reason, my multimeter was detecting voltage everywhere along the strand and along each "icicle."  So that did me no good, I'm not entirely sure why.  So then you can take the obvious approach of just switching out bulbs with replacements, but the trouble is, you might have more than one bad bulb.  In which case, you won't know if you're replacing a good bulb or a bad bulb.

Instead you need to be able to test each bulb individually to know whether it is good or not.  The usual approach is a simple continuity tester (check whether a circuit exists from one lead on the bulb to the other).  But, a continuity test won't work because there is no simple circuit to test.  Unless you actually cause the LED to activate (with enough voltage) you won't have a circuit.  A continuity test only uses a very low voltage and so it will report an open circuit (bad bulb).  So, despite having a multimeter and knowing how to use it, it did me no good in finding the bad bulb.

Instead you need an LED tester.  You can make a simple LED tester using the following:  a 9-volt battery, a resistor, and a rubber band.

IMGP1450a
Without the resistor the only thing you'll learn is that the LED used to work because you'll blow out the LED from too high of voltage (which I did twice before finally digging one out).  The resistor I used happened to be 10,000 ohms, but 1,000 ohms should be fine too.

Just use the rubber band to hold the resistor to the negative terminal on the battery (the negative terminal is easier to wrap the rubber band around, otherwise it really doesn't matter).  Then bend the end of the resistor around next to the positive terminal of the battery so you can easily touch the leads of a bulb to the resistor and the positive terminal.

IMGP1452aIf you touch the LED leads backwards nothing will happen (LEDs are one way only).  It won't damage the LED, but it won't light up either.  Because of this your bulb should be keyed to only fit in its socket one way.  Pay attention to that keying so that you can reliably test the correct orientation and save some time.

IMGP1453aSo with my makeshift tester I started popping out bulbs and testing them (the edge of a dinner knife worked great for popping the bulbs out of their base).  I was actually getting pretty quick at it and it was the 21st bulb I pulled that was bad.  Popped in a replacement and everything was working.

Okay, not a particularly fascinating story, but when I was searching the Internet for how to track down a bad LED in a strand of Christmas lights I wasn't finding much useful information (just lots of information about incandescent lights sometimes with a disclaimer that it wouldn't work for LED strands).

(And in case anyone cares, these are 70-LED icicle strands in "warm white" made by Vickerman.)

1 Year of Ting

October 16, 2013 2:47 pm

We switched to Ting just about one year ago and it's time to do some number crunching to see how it's working out for us.

About Ting

Ting is a mobile virtual network operator (MVNO), which means they run a cell-phone service, but don't own any of the physical hardware.  In Ting's case, it all runs on Sprint's network, but Ting is the company you sign up with and pay and is in charge of all your customer needs.

Their approach is different in that they focus on treating you like a human being and not finding new ways to gouge money out of you.  It's quite refreshing.  Their customer service is top notch and in that regard I've been very pleased.  I don't lament calling them on the rare occasion that I need to.

They allow you to add as many phones to your account as you want, and all phones on your account pool minutes/texts/data so you get a better unit price as the quantity increases (additionally, you pay a $6 fee per line per month to keep it active on the account).

This is the kind of mobile phone plan I've been waiting for.  It fits our needs much better than any other plan I've seen.

Before

We had been on a T-Mobile family plan for about $70 per month with way more minutes than we needed and no texting or data allowance.  It was stupidly expensive.  When that contract ended we switched to T-Mobile prepaid, which was better (we bought minutes 1000 at a time that lasted about a year, but texting was still stupidly expensive and no data--and we had to buy minutes for each phone separately).

Then Ting came along

Ting charges you by the bucket for minutes/texts/data.  Use no data this month, pay nothing for data this month.  No limits, no caps, no overage charges.  No trickery.  I love the billing policy.

So how's it working out for us?

(All the information I report is total between Jess and I since Ting treats it all as one big pool for billing purposes.)

Usage and Costs over the last year per month:

Minutes Minutes Cost Texts Texts Cost Data (MB) Data Cost
Min 21 $3.00 50 $3.00 0 $0
Max 319 $9.00 171 $5.00 145 $13.00
Ave 86 $3.82 104.7 $3.82 84.4 $5.18

Our unit costs look like this (excluding line fee, taxes, regulatory fees):

Per Minute Per Text Per MB
Min $0.028 $0.029 $0.000
Max $0.143 $0.064 $0.120
Ave $0.044 $0.036 $0.061

Our average total cost per month was $25.31 (includes $6 per line fee and all taxes and regulatory fees).  Our most expensive month was $32.21 while the cheapest month was $19.15.

The Ting approach means you don't get any subsidy when you buy your phone, but there are also no contracts.  We bought very entry-level Android phones (Kyocera Rise) for $152.27 each after sign-up discount.  And if you do buy a more expensive phone, you'll most likely still save money over the life of a 2-year contract.

I will probably buy a nicer phone at some point, but I didn't want to spend a bunch of money on a phone until I knew if I actually wanted a smartphone and if I actually liked Ting.

Ting is currently only 1 of 2 companies I will unhesitatingly recommend people try to do business with if it makes sense for their needs.

As I mentioned, they do run on the Sprint network which some people have issues with.  However, Sprint is in the process of a massive overhaul of their network.  The long-term goal of their "Network Vision" plan looks really good and I'm really looking forward to seeing how it plays out.  It should provide better coverage and signal quality for the entire country (it appears to me that they're essentially betting the farm on this overhaul and so far it's looking good).

Update 10/22:
If you're interested in signing up with Ting, use our referral code and you'll get a $25 credit and we'll get a $25 credit.  Everyone wins!  Here's the link: https://z9g8hk18l.ting.com/

Illegal Numbers and the Dangers of Banned Information

October 15, 2013 3:07 pm

Did you know that some numbers are illegal?  It's true.

No, there isn't a law somewhere that says the numbers 745, 1,889, and 131,101 are illegal.  In fact which numbers are illegal isn't even known a priori.  And there's an unbounded (and possibly infinite) number of illegal numbers!  It's crazy!

So how are some numbers illegal?

It all started with the invention of digital storage mediums (i.e., the computer).  You may have some notion about computers operating entirely on 0s and 1s.  That is, they use a binary number system.  Physically, these values are usually stored as a high or low voltage (electrical storage, like a USB thumb drive), the direction of magnetization (magnetic storage, like a hard drive or floppy disk), or as actual pieces of material (physical and optical storage, like a punch-card/CD/DVD/Blu-Ray).  These physical representations are interpreted as either a zero or a one.

Since every piece of data on your computer is stored in some fashion and then interpreted, every piece of data on your computer is represented by a series of zeros and ones.  Any series of zeros and ones in a binary system represents a specific number.  In binary, 01101 is the decimal value 13.  Therefore, every piece of data on your computer has a corresponding number that exactly represents that data.

Take this image for example:

simple

It's just a 64x64-pixel square with bands of red, green and blue.  The number that is stored on the computer to represent this image is:

1238301683640466317815934360806135690116434697154877923
4494792367923755906673163981641861895458337604702343466
2810700348261887772411034091469320270991594673908631991
5844885402876248165441943076299189588485408932698051652
9274954637784672242688658729288559072939506175348618889
6499525714591179951958772678400887694932269665261700174
3252008568133749407688395385589539990171146138088533455
4251168727225022618657147246713345507166265266049883607
2457758487000098535759665677768294453081438629169206933
668292205864758173826

In any sense that matters, this number and that picture are equal—with the important understanding that I told the computer to treat that number as if it were a picture (specifically a png file).  I could just as easily tell the computer to interpret that number as audio, or video, or text (but it would appear to be garbage if interpreted in any of those ways).

That picture is this number and this number is that picture.  It has to be so in order for computers to work.

Now here's where this gets interesting and a little bizarre.

There are many laws that make certain physical objects illegal to possess under many circumstances (drugs, explosives, etc.).  But our legal system has also made certain types of information illegal to possess. One such category is child pornography.  To my understanding it is illegal to possess any instance of child pornography, regardless of intent.  If such an instance exists on a computer then the number that represents that illegal information is itself illegal, for the number and the image are one and the same.

Other types of information are legal to possess, but illegal to share with others.  The DMCA makes it illegal to provide to others any tool which is capable of circumventing any measure designed to prevent access to a copyrighted work.  Meaning I could write a piece of software to copy DVDs, but it's illegal for me to use it or give it to anyone else.

This seems like it creates some real legal challenges.

I don't think anyone would disagree that a website dedicated to posting and sharing child pornography would be illegal.  But suppose that instead of pictures a website is set up dedicated to posting numbers.  The only things posted are numbers and discussion of those numbers.  Surely there's no harm in a website dedicated to numbers.

Now suppose during the discussion of some number, someone suggests that people tell their computers to interpret that number as an image (create a file, load in the binary form of the number, set the file extension to .jpg or .png, or .gif).  And suppose that the resultant image is illegal as described in the previous section.  Who, if anyone, is legally liable for possessing or sharing this illegal number?

This is a theoretical practice as far as I'm aware, but let's take another step anyway.  MIT hosts a site with the first 1 billion digits of PiThe current record for calculating Pi is just over 10 trillion digits (though not posted for viewing).  Surely if pi continues on forever and never repeats it would have to eventually include all illegal numbers.

Suppose someone sets up a website that says start at the 19,995th digit of Pi, take the next 3,021 digits and interpret it as an image or run it as a program.  And again, suppose that interpretation is illegal.  Is anyone at fault?  Should they be?

This is the trouble that occurs when information itself is made illegal.

This referencing is how your computer works though.  You can consider your hard-drive as an incredibly long list of zeros and ones and through some conventions your computer looks at one set of numbers which tells it how to interpret the other numbers (go to the 1,313,163rd bit, take 766,122 bits and treat them as a picture).

So, given an illegal number sitting on your hard-drive, is the number itself illegal, or is it the other numbers elsewhere on the hard-drive that tell the computer how to treat the first number?  Or is it only the pair together that's illegal?

How many steps out do we go before illegal numbers are no longer illegal?  Can I break up the numbers into parts and have people add them back together?  Can I tell you to get X numbers from pi and then use those numbers to look up in pi the illegal number?

We can sort of borrow a concept from quantum mechanics to describe the situation: A number is a superposition of information.  It only takes on definite meaning once a specific interpretation is applied.  So is it the person applying or sharing the specific interpretation that is at fault?

Kyle's Hypothesis

Using this superposition idea, I propose the following hypothesis:

A number exists which represents a perfectly innocuous piece of data but when interpreted in another format (e.g., image) is illegal.

What happens if some particularly popular number (e.g., a song in mp3 format) turns out to be the same number that represents something illegal?

In this case, it's only the other numbers on the hard-drive that specify how to interpret the mp3 as either a song or something illegal.  Is it then illegal to suggest to other people to interpret the same number they already have in a different way?

Once you start making information itself illegal to possess or distribute, you start creating some really bizarre corner-cases for the legal system.

(For the technically minded:  For simplicity I'm ignoring the scenario where magic-number headers may be used to suggest file format within the file itself.)

Update to answer Megan's question:

Megan asked what

846513265498765646454545431313

15464875465134876532165400014654684
would look like as a picture.  As my parenthetical at the end the post alluded to, it's not quite as simple as I made it sound.
There is this notion of "magic-number" headers.  Which is really just a convention that computer scientists use that says when I want this data to be treated as a BMP file, the very first thing in the file will be the number "16973" which stands for the letters BM.  There are similar magic numbers (or "fingerprints") for many different file formats.  Many programs that know how to open a BMP file, won't even try if the magic number doesn't match.
So by directly dumping Megan's number into a file and trying to open it as various image formats I only got error messages.  So I used the simplest file format with which I'm familiar (pbm) and added the proper magic number (P3) and header (which describes the width and height of the image; I chose both to be 5 arbitrarily).
The resultant number is now
6086291824888092467866770275946841
3783905258129499855885219551478363
6286731887369226
And the image itself is just a smudge.  The pbm format is black and white only, no grey.  And I've blown the image up to 65x65 pixels so you could actually see something (remember it was only 5x5 to start with):
megan

I did not change anything about the number Megan provided, I simply added the necessary information that tells the computer how to interpret that number into an image.

If I change that interpretation to expect a very simple color image (a PPM file with magic number P6, 4x4 pixels with only 8 possible colors) then the image looks like this (blown up to 64x64 pixels):

megan2

Most of the image is white, so you can't really see it against the white background.