No Excuses

A member of my family recently posted a link to this article by Frank Turek on which, in turn, cited this article by Mariam Bell on I have general disagreements with Turek and Bell regarding issues wider than just politics which I won’t get into here, but I’d like to point out the good and bad points that they make. I’ll focus on Turek’s article, as it was written as a reaction/in apparent concurrence with Bell’s. Only a week until the election, having the truth is important, and these articles, while praised by this family member, get a few things wrong.

The Good

Mariam Bell points out that the individual whose name is on the ballot is not the only person one is voting for: rather, the entire administration that individual brings with them. Quite right, and an important thing one might wish to factor into their decision. This is something that I hadn’t thought of in those terms. One hears a presidential platform, and doesn’t think of the hundreds, or more likely thousands, of individuals that may be required for a president to actually steer the country in any particular direction.

As for the rest of Turek’s article, well, I honestly can’t find much good at all, because each marginally good sentence is followed by a paragraph of nonsense. I’ll note one more statement I can’t find any reason to disagree with, though: “both candidates have undeniable character issues”. In my opinion one individual’s “issues” are more offensive than the other, and I imagine that’s true for a large majority of likely voters this year. Probably the deciding factor, one way or another, depending on your perspective.

The Not-So-Good

I’m going to go through a rebuttal of the majority of Turek’s seventh paragraph.

“[T]he corrupting politicization of the IRS and the Justice Department”. I’m not sure exactly what he’s referring to, but I can take a stab at it: the IRS blocking (or delaying) approval of “right-wing” non-profit groups, and the power any Supreme Court appointee will have. The IRS was chastised for their behavior. While that’s not much, there’s not a whole lot else that can be done. The individuals involved have been sanctioned if not fired. What else do you want? If it’s the Johnson Amendment you take issue with, the IRS is extremely inconsistent in enforcing it, but it seems pretty straightforward to me. Article II Section 2 Paragraph 2 says the President is the one who appoints Supreme Court Justices, and likewise gives Congress the power to “vest” them (officially grant them the authority of their office). Don’t like Merrick Garland? He’s about as conservative as any Democratic nominee is going to be, and you’ll probably like Hillary’s nominee less, whomever that might be. Trump? His first choice has already refused the appointment. What will others do?

“[T]axpayer funding of the abortion-and-baby-parts-selling Planned Parenthood”. What little Planned Parenthood gets from the government is, yes, funded by the taxpayers, but, due to the much-discussed Hyde amendment (I’ll get back to that), the money cannot be used for abortion or abortion-related services. Yes, while some Planned Parenthood clinics do perform abortions or provide abortion-related services, they do not sell baby parts! Any money changing hands for transfer of fetal tissue is to help offset the cost of handling medical transport, and the group still often loses money on these transfers.

“[T]urning the military into a sexual social experiment, even to the point of paying for transgender surgery”. The military is not, nor is it becoming, a sexual social experiment. Life is. I met some transgender individuals a little over a week ago, and three of them were kicked out of the military for being trans, two of them very recently (but prior to the 2015 change), and none of them had medical services related to their respective transitions (hormone treatments, therapy, etc.) payed for even in part by the US Government. Yes, there was another change in mid-2016 that allowed DoD medical funds to support transition surgery (until then performing such procedures under Tricare was illegal; I’m not sure the current situation), but there is still a significant amount of debate as to when, how, and what for the treatment might take, and each individual may be different. These are normal people. They volunteer(ed) for service toward their country, and are proud to serve. What they do in their bedrooms, which gender they might be sexually attracted to, which gender they identify as, does not matter. I’m not advocating a return to “don’t ask, don’t tell”, either. If any individual “can’t help” but to act on their sexual impulses, “straight” or not, in general, much less in the heat of battle, they aren’t cut out for service in the first place. All LGBT people are seeking is the same rights as cisgender heterosexual individuals already enjoy: the ability to be themselves.

“[F]ederally imposed same-sex marriage”. Let me ask Frank one simple question: due to Obergefell v. Hodges, were you forced to marry a man? Or are you still happily married to Stephanie? All LGBT people are seeking is the same rights as cisgender heterosexual individuals already enjoy: the ability to be themselves.

“[F]ining religious people for refusing to participate in same-sex ceremonies”. The individuals and companies who have been fined thus far have set up a business ostensibly for the purpose of serving all comers. Some city or state statutes forbid discrimination toward clientele based on sexual orientation, these businesses violated those statutes, and were fined because of it. No pastor (the most “involved” participant outside the couple) is required to perform the ceremony against his or her conscience (provided the rules of his religion/denomination don’t also forbid discrimination), nor will he/she be fined for not participating. Baking a cake or arranging flowers should not be an undue burden on any bakery or florist if they bake cakes for all others. What sort of uproar would they get if they denied service to a mixed-race couple? A Muslim couple? All LGBT people are seeking is the same rights as cisgender heterosexual individuals already enjoy: the ability to be themselves.

[F]orcing nuns to pay for contraception and abortion”. No they’re not. Zubik v. Burwell, while not the final word on the subject, related to religious institutions not wanting to go so far as to file paperwork stating their objection. If signing a piece of paper (objecting to paying for health care for employees that includes contraception) is too burdensome on your conscience, well, I think you have some other issues. The health care does not cover abortion. But the court disagreed with me, and these institutions are (at least at the moment) not even required to file the one-page form. The nuns are not paying for contraception or abortion.

“[F]orcing public schools to allow boys into girls showers and restrooms”. This again? No, no, no. Transgender people are not “boys in girls’ restrooms”. They are girls who have been assigned a male gender at birth. As many as 3% of people in the US have some medical condition which could directly cause gender dysphoria; far fewer actually exhibit it, and most are terrified of admitting it due to social stigma. Voyeurism and sexual assault are still illegal, whether they happen in a public school restroom, in a mall, or behind a bar. Those locales which do allow people to use the restroom corresponding to their gender identity have noted zero increase in the incidence of sexual assault. For restrooms in particular, get in, do your business, wash your hands, and get out. End of story. All LGBT people are seeking is the same rights as cisgender heterosexual individuals already enjoy: the ability to be themselves.

“[L]ax border security”, “failure to enforce immigration laws”. Uhm… Obama has deported more people than any president before him by an order of magnitude. You want a wall? Mexico isn’t going to pay for it. Besides, net immigration over our southern border is actually negative since 2008. Angry about Syrian refugees coming to live in the US? The screening process individuals have to go through is far more rigorous than any other country. Might someone slip through the cracks? Of course it’s possible, but there’s no such thing as perfect security. We’re working with “highly vetted”, and that’s the best any of these candidates can manage. We’ve already got a terrible track record of relocating, even to allied countries much less to our own shores, those who have risked their lives and their families in service to the United States in wars or conflicts in their own countries.

[P]ay-to-play at the State Department by a political appointee now running for President (who is again under investigation by the FBI)”. Hillary Clinton and the Clinton Foundation have tried and failed to give the public impression that there was no influence to her position as Secretary of State and certain donations made to the Clinton Foundation. From what I’ve read the evidence of a connection seems shaky at best—I don’t think there was any influence there, but this isn’t something I can prove one way or another.

He goes on to state the “futility” of voting third party:

You’d rather issue a protest to both candidates by voting third party?  I understand the sentiment, but sentiment can’t change policies or save lives. Only voting for an administration that actually has a chance to win can.

Okay, he’s likely right that third parties don’t have a chance, but despite this, a mere eight days before the election, FiveThirtyEight gives McMullin a 19.2% chance of winning at least one electoral vote. If there is a deadlock (currently rated as a 1.0% chance), even with that this Libertarian (running as an Independent—Gary Johnson is that party’s nominee) could theoretically be the next President of the United States. Not likely, no, but possible. Voting third party will only be “stupid” or “throwing your vote away” until that idea itself goes away. This election cycle has already shown us the bias “inherent in the system. Help! Help! I’m being repressed!” Dennis Prager likens voting Republican this time around to allying with Stalin during WWII (though pointing out that he’s “not implying that Trump is Stalin, or that Clinton is Hitler”, it’s too late, he already invoked Godwin).

I’m not going to go into his pleas about protecting the life of the unborn, but Trump used to be pro-choice. Is a man this capricious going to stay pro-life throughout his tenure? He’s also a member (nominally) of the Presbyterian Church which does not, as a rule, believe abortion should be legally restricted.

Then he implies what I’ve seen a lot of people say, that a vote for Hillary will destroy any semblance of religious freedom in this country. Other prominent individuals on the right (whether or not they deserve the prominence) have expressed the belief that they will be arrested or shot simply for being Christians if Hillary is elected. Uhm… do you know that she’s a Christian? Perhaps as a Methodist you don’t think she’s the right kind of Christian, or she’s not really a Christian, but does the same not apply to Trump? Or does his lip service to and from Dobson, Graham, and others make him automatically better? If she, or, frankly, any, President were to take that sort of stance on religion, there’s a First Amendment to the Constitution of the United States in the way. And believe it or not, it’s something that Presidents have to obey just like anyone else.

Additional Commentary

If you’re voting against a particular candidate just as if you’re voting for one, Turek and Bell’s point about considering the administration they bring with them is a good one. But keep in mind that, whether Clinton or Trump win, the country will (probably) be much the same as it is four years from now. Remember Obama’s day one action to close Guantanamo? It’s still there, and still open. If Clinton’s day one action is an order to “kill all the Christians”, you can be fairly confident that there will be about as many Christians in the US four years from now as there are today. If Trump’s day one action is an order to nuke Moscow…okay, maybe that’s a bad example.

The Democratic platform explicitly includes repealing the Hyde Amendment (search for “abortion” here). Hillary Clinton herself has agreed with this point, which is something you may wish to consider if you believe life begins at conception. Yet women still die on a regular basis, not because they don’t want a child, but because there is a complication that threatens the life of the mother. Despite the explicit allowance for funding of abortion in the event that this is the case, many hospitals are religious institutions and make the decision for the mother and child to both die rather than sacrifice the child’s life for that of the mother. Keep that in mind as well.

Clinton’s Scandals

She does have her own share:

  • Lax cybersecurity regarding her handling of e-mail while Secretary of State. Perhaps imprudent, even negligent, but as the initial investigation seemed to reveal, very unlikely criminal. And not unprecedented, either (see Colin Powell, Condoleeza Rice).
  • Transparency issues regarding that same server. While nearly impossible to prove motive without admission of guilt, this seems to be the most believable/realistic as an actual issue considering what we know.
  • Clinton Foundation and Secretary of State collusion. I mentioned this earlier, but I haven’t seen anything that compels me to believe that in her position as Secretary she did anything in response to or as a result of donations to the charitable foundation.
  • Benghazi. Seven investigative committees found no intelligence failure (the eighth, an internal investigation by the State Department, didn’t either but said it was their own incompetence), yet Clinton (and Obama) still get the blame for the deaths of four Americans.
  • Wikileaks emails from John Podesta. Try his risotto recipe! There’s nothing here that any (traditional) campaign would find damning, just business. Having a personal opinion that differs from what you say on the trail is politics, not blatant dishonesty.

Taken together, and the fact that all of these are from the past eight years (nothing from her time as First Lady of Arkansas or First Lady of the United States, though much of this may have stemmed from Whitewater “back in the day”) might make her seem pretty bad. And she might be. Is she worse than Trump?

Trump’s Scandals

Despite his eventual rise to the top of a party known for family values, like the honey badger, he don’t care.

  • He’s on his third wife, “trading them in”, as it were, every 10 years or so.
  • He’s on record as saying he would date his own daughter(s) if they weren’t his and they were of age.
  • He regularly sexualizes any and every female he meets, one way or another (he wants to #$%@ them, they’re fatties or bimbos, etc.). He has bragged about walking in on Miss America contestants in various states of undress, and there is video evidence of him kissing a Miss America winner, obviously going for the lips.
  • He’s traded political parties as often as he has spouses
  • While he may be a savvy businessman, few would consider him a good businessman. Regularly he refuses to pay workers for completed jobs, and still his casinos go under. His brand fails to attract clients leading to dozens of failed ventures, but he always rises to the top, trampling others to stay there. He’s got a lawsuit pending about Trump University, too.
  • Thinly veiled racism. He recently threw out a supporter from a rally, an African-American who had paid $1500 to attend, believing that his skin color meant he was a protester (a pattern not an isolated incident). He didn’t denounce the endorsement of David Duke, former Grand Wizard of the KKK. He stated even from the beginning of his campaign that he thinks Mexico is “sending” their worst, rapists and murderers to the US. He called a latina Miss America “Miss Housekeeping”. He has stated a desire to have a religious test for people entering the country, while such a test is unconstitutional when it comes to attaining political office here.
  • Multiple times he has stated his desire/intention to use nuclear weapons on enemies of the United States. His desire to give nuclear weapons to Japan, South Korea, even Saudi Arabia. If he wants to turn the Middle East into a sheet of glass, what’s to stop him?

Again, these are less individual scandals than they are patterns of behavior. I think a reason that Trump’s accusers haven’t been as big a story is that they’re not surprising. Not being surprised that dozens of women are accusing a presidential candidate of sexual assault—more than that, believing that their accusations probably have merit—this isn’t a problem? This doesn’t indicate a larger issue with the man himself? On top of this, he’s proven to be mercurial and authoritarian throughout this campaign.

Is he worse than Clinton?

Other Candidates

Gary Johnson and Jill Stein are on a majority of ballots this year. I have bigger issues with Stein (despite a medical degree she has voiced support for the anti-vaccine movement) than Johnson, but neither are excellent. I know next to nothing about McMullin, but he’s supposed to be more of a Libertarian than Johnson (or, at least, that’s how he’s positioned himself) so if he sticks more or less to that platform he’s…well, still not excellent.

In Kansas? Want to vote for someone other than Clinton, Trump, Stein, or Johnson? To the best of my knowledge your options are Darrell Lane Castle, Roy Allen “Santa” Clark, Scott Ralston Cubbler, and Richard A. Duncan. Write in “Mickey Mouse” and even if 300,000,000 others try the same, it’s not going to matter. The one person who fills in a bubble for a real person gets to then make the decision.

It’s All About the Pentiums

Given a tree structure, which I will represent here as an ordered list, what is the best way to flatten the tree to a table as below? In other words, how can I turn this:

  1. Item 1
    1. Item 2
    2. Item 3
    3. Item 4
      1. Item 5
  2. Item 6
    1. Item 7
      1. Item 8
      2. Item 9
      3. Item 10
    2. Item 11
    3. Item 12
      1. Item 13
      2. Item 14

Into this:

Item 1 Item 2
Item 1 Item 3
Item 1 Item 4 Item 5
Item 6 Item 7 Item 8
Item 6 Item 7 Item 9
Item 6 Item 7 Item 10
Item 6 Item 11
Item 6 Item 12 Item 13
Item 6 Item 12 Item 14


In other words, I need to retain the structure of the tree, so simple “flattening” doesn’t work: all the examples for flattening such a nested structure that I’ve seen turn it instead into

[Item 1, Item 2, Item 3, Item 4, Item 5, Item 6, Item 7, Item 8, Item 9, Item 10, Item 11, Item 12, Item 13, Item 14]

Here’s my object, or something close enough:

class Node:
    def __init__(self,leaf,branches):
    def has_children(self):
        return bool(self.branches)

where branches is only a list of other nodes (this is enforced, though not above, for simplicity)

The closest I’ve managed to get so far is

Item 1 Item 4 Item 5
Item 6 Item 7 Item 8
Item 6 Item 7 Item 9
Item 6 Item 7 Item 10
Item 6 Item 12 Item 13
Item 6 Item 12 Item 14


Almost, but not quite.

I’ve also managed to transform it slightly to this:

[{'item':'Item 1','list':[
	{'item':'Item 2'},
	{'item':'Item 3'},
	{'item':'Item 4','list':[
		{'item':'Item 5'}]}]},
{'item':'Item 6','list':[
	{'item':'Item 7','list':[
		{'item':'Item 8'}
		{'item':'Item 9'}
		{'item':'Item 10'}]},
	{'item':'Item 11'},
	{'item':'Item 12','list':[
		{'item':'Item 13'},
		{'item':'Item 14'}]}]}]

with this nifty recursive snippet:

def tablify(itemlist):
    for i in itemlist:
        if i.has_children:
    return table

Not really progress.

I figure recursion is necessary because I don’t know the depth of my structure. Here it’s 3 deep, but it could be deeper. For my purposes, I wouldn’t mind if I wound up with the following, though:

[[Item 1, Item 2],
 [Item 1, Item 3],
 [Item 1, Item 4, Item 5],
 [Item 6, Item 7, Item 8],
 [Item 6, Item 7, Item 9],
 [Item 6, Item 7, Item 10],
 [Item 6, Item 11],
 [Item 6, Item 12, Item 13],
 [Item 6, Item 12, Item 14]]

because that gets me 99% of the way to my goal. Filling in the blank spots with nulls or    is a piece of cake.

It took a great deal of sweat and blood and tears and head banging against a keyboard, but I have achieved success!

def tablegen(itemlist,parentlist=[]):
    for i in itemlist:
        if i.has_children:
            for t in tablegen(i.branches,parentlist+[i]):
                yield t
            yield parentlist+[i]

Now, list(tablegen(top_level)) provides the desired output (the one just above the horizontal line). I’m guessing that it can be optimized a bit more: I have a feeling the if/else block can be eliminated, but I don’t know how. Not much is left to turn that output into a table, I just need the number of columns, which comes from the following bit of wizardry:


And this is only to make the table look pretty, it’s not strictly necessary.

Point is, I have finally achieved my goal! And now back to your regularly scheduled weirdness

Somewhere Over The Rainbow

There’s no place like ~/.

Most of the time, I have no issues with Linux, whichever flavor I happen to be interacting with at the time. WSL, Ubuntu/Debian, Gentoo, OpenSUSE, CentOS, etc. So long as there’s some sort of package management in there somewhere. But when I run across a new thing that I just have to have, or the developers are too hoity-toity to submit their work to be packaged up, or too small to be noticed by package managers, I’m left scouring the web for dependencies.

I wanted to try out GeoDjango. Simple enough, I figured. I already have Django up and running, I just need a few extra packages: GEOS, PROJ.4, GDAL, GeoIP2, and SpatiaLite. The first four weren’t any issue. “But James,” I hear you say, “SpatiaLite is available in all those distros.” Shut up. I misspelled it when I tried to install it that way, but it’s too late now. I just want to vent my frustration.

Anyway, first it complained that I didn’t have libfreexl. I don’t care. ./configure –disable-freexl . No SQLite headers? Sheesh. sudo apt-get install sqlite-dev . Not found. Of course. Again, pipe down, I know that was wrong now also. So I compiled SQLite from source. Then GEOS. Oh, but I need Python bindings. ./configure –enable-python . Really? I need SWIG now? Fine. sudo apt-get install swig . Try again. What?! the GEOS Python bindings weren’t written with Python 3 in mind? Oi. Wait a sec… sudo apt-get install geos-dev . Huzzah! Back to libspatialite. Now you need libxml2? I know apt has that. Of course, it depends on icu, but I don’t have to worry about that this time because the package manager is doing its job. Fricking finally. I then configure, make, and make install my way to libspatialite.

Here’s a tip, Django folks: for Debian-based systems, two lines:

sudo apt-get install libproj-dev gdal-bin python-gdal libsqlite3-mod-spatialite
pip install geoip2

It may not be perfect, and you might not get the latest and greatest, but I’m sure it’s close enough.

At least after that adventure my original Django project is offline, and the error logs don’t seem to exist…