You Don’t Own Me

What do you mean by “traditional marriage”? The Supreme Court will (likely) reveal its decision in Loving v. Virginia Obergefell v. Hodges at the end of next month (could theoretically be sooner), and many pundits and preachers are decrying this as an attack on “traditional marriage”.

So let’s see, what do we mean by “traditional marriage”? From bronze-age societies up until fairly recently, the idea of “marriage” was the transfer of property (the bride) from one man (the father) to another (the groom). Residuals of this still exist: the “giving of the bride” in the ceremony, and the bride changing her surname to that of the groom. Of course, this is not always the case, but many couples for which it is not true are considered by others to be “progressive” or “liberal”.

But wait, marriage has always been between one man and one woman, right? Well, from bronze-age societies up until fairly recently, the idea of “marriage” was one man and however many wives he could handle. Since these pundits and preachers mainly refer to the (Protestant Evangelical Christian) Bible (sans The Book of Mormon, et al), let’s check that out. Jacob? Two wives. David? Two, then he “took more…wives”. Solomon? Seven hundred. All of these men were considered “godly”, at least for the most part, and I barely made it through 1 Chronicles. And nowhere in the Bible do I see any command that a man should have one wife.

What about interracial marriage? That was considered “non-traditional” and many (if not most) of the same arguments made in 1967 were made in amici or on talk shows, amidst vehement denial that there were any similarities between them. And interracial marriage was legal 28 years before it gained simple majority acceptance. Same-sex marriage may finally be legal 4 years after gaining simple majority acceptance (via).

Change Your Mind

I was reading through my old blog posts (Google saves everything, apparently, even when I thought the software was only installed on my local machine), and it reminds me of how much I’ve changed, and what I would change now if I could replace myself when I went to college (a lot). The biggest thing holding me back, perhaps, was not recognizing that I had some faulty wiring in my head.

I ideated suicide frequently (which prompted, in December 2003, an intervention by my parents that saw me in a psychologist’s office for three very expensive and fruitless sessions1—the Zoloft, prescribed by a general physician, worked much better). My preferred fantasy included a power drill, based somewhat on the movie Pi, though jumping, slitting the wrists, and painkiller overdoses all made their showings.

My specific obsession those first three years was a girl named Becca. I still wish I’d asked her out, and I still have trouble letting go of friendships that are long past their expiration dates. In general I had an obsession with romantic relationships in general, though I only asked someone out a total of two times in five years of college.

Reading through those old entries I notice how much I desired contact with a God who seemed absent (I’ve a good idea why, now). I was paralyzed with fear of sinning—a stray lustful, envious, jealous, or idolatrous thought would send me into an even deeper depression and I’d be wracked with guilt for days.

In general, I find it amazing that I didn’t notice (nor did anyone point out to me) the crippling depression I was suffering, much less suggest a solution.

Anyway: Depression lies. Call 8002738255: don’t be afraid, they know what you’re going through. Depression lies. Don’t believe it. Depression lies. Get help. Depression lies. Help others. Depression lies. Talk about it. Depression lies. Do you know more than 4 people? Chances are good that at least one of them (or you) is suffering or has suffered from depression. It’s important! I’m not saying cannabis or checking into a mental health facility or some type of talk therapy or medication or diet or exercise are for you; any one of these or other remedies might be the ticket, but you’ll be stuck in a rut unless and until you get help. Look here or here for more.


Since an interview with the Wichita Eagle on Tuesday Night (for an article at some unspecified point in the future in which I may or may not be mentioned or pictured) I’ve been considering how I could have told “my story” better. I then listened to a piece from the Skeptic’s Guide to the Universe‘s 10-year/10-hour show, specifically, an interview with Julia Galef on changing one’s position based on the evidence. This would have been the best way to frame my story, but I stumbled over my own words with the reporter typing away. If I get quoted, hopefully it’s something that’s, well, at least not too inaccurate!

  1. not at all to say that psychotherapy is useless—in the right context, and for certain people, I highly recommend it. The particular context and time wasn’t appropriate for me

Money

Debt. Consider all your credit cards, student loans, mortgage, a car payment or two, and the financing on your smartphone. They all have different interest rates, calculated in various ways, with payments sometimes being applied non-equally across balances (like promotional, seasonal, balance transfer, and cash advance rates on credit cards all might be different, and a payment might or might not be applied to the balance with the highest interest rate first). How might one figure out how best to pay off these debts?

With a conservative Christian circle of friends and family, Dave Ramsay and Larry Burkett are quoted at me a lot, but, while their debt snowball calculator can be useful, I doubted it was necessarily the most efficient method. I haven’t yet created a function that matches theirs, but the main problem I see is that it doesn’t re-order the creditors or balances in any way.

Another piece of advice I’ve often heard quoted is the idea that one should pay off the highest interest rate first, then work your way down. The idea that this is the most financially sound (that it avoids the most interest) is not always valid, while it seems logically sound. In certain scenarios this does work, but it can be (quite) a bit more complex than that when dealing with several balances.

I’m going to use some completely realistic numbers for an example scenario. Realistic because they’re not too far off from a reality I faced in the not too distant past. Not actually real because the numbers have been slightly modified to protect the guilty parties.

Reference NumberTypeInitial Principal BalanceInterest RateMinimum Payment PercentageMinimum Payment Amount
1Credit Card881.4821.99%3.00%35
2Credit Card1259.3721.99%3.00%20
3Credit Card1063.5421.99%120
4Credit Card5458.2818.20%2.25%25
5Credit Card9395.247.90%3.00%20
6Credit Card10537.4516.99%2.42%20
7Car Loan9082.43.75%183.04
8Miscellaneous Loan9380.774.25%277.94
9Cell Phone770055
10Mortgage 196263.743.75%463.12
11Mortgage 2161391.633.75%972.54

The minimum payment for this set of loans is $2803.66 (35.00+37.78+120.00+122.81+281.86+254.57+183.04+277.94+55.00+463.12+972.54).

Paying the minimum, it would take 27 years 9 months to pay off all these loans with $151456.03 interest.

Additional PaymentPayoff TimeInterest Paid
027 years 9 months151456.03
10023 years 6 months128311.29
25017 years 10 months96941.52

What happens if we rearrange this so we do work on the highest interest rate first? How does that change the outcome?

Additional PaymentPayoff TimeInterest Paid
027 years 9 months150395.76
10025 years 11 months133170.63
25023 years 1 month119501.26

Already it’s clear that paying the highest interest rate alone, even when throwing a constant amount above the minimum at one’s debts, isn’t always the best method.

The method I prefer is quite similar to the snowball method, but rather than keeping all payments equal to the current minimum until one is paid off (and subsequently applying that balance to the next, and the next), mine is adjusted so that the minimum balance is paid on all until one is paid off, keeping the overall paid balance the same.

Anyway, with my method, and the original sort order:

Additional PaymentPayoff TimeInterest Paid
011 years 5 months77763.61
10010 years 11 months74617.76
25010 years 3 months67780.65

But which order to pay these in? Can a different order get me a better (lower) number on interest paid and/or time to pay?

While there may be a better way, I only know brute force, which means I have 11!=39 916 800 possibilities to try out, but even so, by my figuring and without paying a penny extra per month, simply by rearranging the order in which the cash is applied, I can get interest paid down to $77033.62 (after trying only about 23% of the possibilities, though that took about 22 hours). Yes, that includes the two mortgages! A savings of a mere 1% might not seem much over the course of 23 years, but savings can be quite a bit more, percentage-wise, for other amounts. Dropping the mortgages for the sake of argument (and ease and speed of calculation), let’s revisit that last table:

Additional PaymentPayoff TimeInterest PaidReordered Payoff TimeReordered InterestNew Order
03 years 6 months9627.473 years 6 months9085.053, 1, 9, 2, 6, 8, 4, 5, 7
1003 years 3 months9423.473 years 2 months7849.853, 2, 9, 1, 4, 6, 8, 5, 7
2502 years 10 months7183.472 years 10 months6633.551, 2, 3, 4, 6, 5, 9, 8, 7
10001 year 11 months6635.471 year 10 months3834.801, 3, 2, 4, 9, 6, 5, 8, 7

By shuffling the order in which one pays off debts, one can save more than 16% at the $100 additional amount. Note also that the time doesn’t change much at all, despite the occasionally massive changes in interest owed. Work the system to your advantage. (Note also that the initial interest always ends in 47¢. This could be an amazing coincidence, but is probably a bug in my code. I believe it is insignificant in the grand scheme of things, however! I’ll revisit the calculations once I produce code that’s ready for the light of day.)

As far as that code goes, here are my goals:

  1. Make the DebtCollection class iterable
  2. Drastically increase the speed of the shuffling/interest calculation code (10–20 minutes for 362 880 permutations; est. 100 hours for 39 916 800)
  3. Calculate maximum interest for shuffled objects
  4. Allow for a single Debt object with multiple balances at separate interest rates
  5. Correct for payments that do not occur monthly (e.g. biweekly)
  6. Use Decimal class to head off rounding issues
  7. Automagically calculate amortized payment if initial balance is provided
  8. Output payment schedule in nicer format (CSV, HTML, PDF, something) including dates

And my evaluation of those goals:

  1. Easy.
  2. I haven’t noticed any sort of pattern in the results yet, so this one’s more than a bit tricky.
  3. Just one line of code to add to #2.
  4. Another tricky one. I’d have to deal with the ability to specify the order in which balances are paid.
  5. Harder than I initially thought. Could multiply by an appropriate scalar, but that’d turn out incorrect answers.
  6. I can implement as I clean up the code.
  7. If initial balance is provided, easy as pie.
  8. Almost entirely cosmetic, unless I decide to add due dates for each of these, in which case I’d need an extra method for DebtCollection: next_due or something.

Drawing

The problem with abandoning C++ to directly write images means that I have to process the data somewhere else to turn a vector into a pretty picture. The problem is that Python can’t (natively) handle  the 80-bit (16-byte as written to a file) long double, much less some theoretical 128-bit or larger floating point number. And while it would be dead easy to make an interpreter to read larger integers, due to IEEE-754, interpreting extended precision floating point numbers isn’t quite so simple.

Take π, for instance. As a short (32-bit floating point number) its hex representation is 40490FDB. In binary, that’s 01000000010010010000111111011011. The blue is the sign bit (0 means positive, 1 means negative). The green is the exponent with a bias. Converting that directly to an integer would give 128, but it’s offset by 127, so the exponent is actually 1. The red is the significand. There’s a hidden bit, too, so that significand is actually 110010010000111111011011, or, in decimal, 13176795. But the significand comes after a decimal point, so it should be 1.10010010000111111011011, which is 1.57079637050628662109375. Multiply by 21, and we get 3.1415927410125732421875.

As a double (64-bit floating point number) its hex representation is 400921FB54442D18, and binary is 0100000000001001001000011111101101010100010001000010110100011000. The bias of the exponent is 1023 here; the exponent is still a 1. The significand is 1.5707963267948965579989817342720925807952880859375, and multiplying by 21, we get 3.141592653589793115997963468544185161590576171875.

As a long double (80-bit floating point number) its hex representation is 4000C90FDAA22168C000, and binary is 01000000000000001100100100001111110110101010001000100001011010001100000000000000. Now, in this case, we get nothing from a long double. There is the added confusion of this (old) data type not having a hidden bit. It ought to be 01000000000000001100100100001111110110101010001000100001011010001100001000110100, but the preprocessor apparently strips out a few bits. It was assigned with the following code:

long double c=3.14159265358979323846264338327950288419716939937511;

which should (theoretically) result in what would, in decimal representation, be 3.141592653589793238295968524909085317631252110004425048828125, accurate to 18 places.

The point, though, is that if I want a digital representation of π accurate to, say, 50 decimal digits (3.14159265358979323846264338327950288419716939937511), none of these really cut the mustard. 15 is all I really get.

And yes, I know the 50th digit of π after the decimal point is a 0, but the 51st is a 5, so I’m rounding up.

Oh, wait, I did get off topic. The real point is that creating an interpreter for larger representations of these numbers is harder than I’d like it to be. I’m not sure if I’m going to attempt it or not. As already shown, C++ native long double doesn’t buy me anything, but if I start using GMP or MPFR, I would need perhaps yet another interpreter specific to the binary output of these. If only I could manually set the sign, mantissa, exponent, and bitcount of an mpmath object, but even that wouldn’t necessarily be sufficient.

Just thought of something that should have been obvious: I don’t need that sort of ridiculous resolution on the image side—a plain ol’ double should be more than enough! Problem (more or less) solved!