Wireless Programming for FTC Robots

Last Updated: September 11, 2017

[An abbreviated version of this concept was presented at the 2017-2018 FTC season kickoff in Reno, Nevada on September 9, 2017. The slides are available.]

What is the problem?

Programming an FTC robot normally requires the user to connect the robot’s Android device (phone) to the computer via USB and press the “Run” [▶] button in Android Studio. This means getting up from the comfy chair, removing the device from the robot, plugging it into the computer, and then reconnecting it to the robot. This is slow and inefficient. This also means repeatedly unplugging and plugging the Micro-B USB connectors, which are fragile and easily broken. What if that wasn’t necessary?

How-to

To get straight to the “how-to” and skip the explanation of how or why this works (and if it’s okay to lose Internet access on the PC while programming or debugging the robot), see the following three most important sections:

  1. Simple: Join the WiFi Direct network from the PC
  2. Add several useful “External Tools” for ADB to Android Studio
  3. Connect wirelessly to program and debug an FTC robot

To avoid losing WiFi internet access on the PC while programming or debugging the robot, see the following additional sections:

  1. Appendix: USB WiFi Models – Acquire a small WiFi adapter.
  2. More elegant: Add a second WiFi adapter to the PC

Otherwise, on to the explanation!

What is ADB?

The Android Debug Bridge (ADB) protocol allows Android Studio to communicate via the adb program with the device, normally attached via USB. ADB allows programs to be stopped and started, files to be copied to or from the device, new APKs to be installed, running processes’ CPU and memory to be monitored, and logs to be accessed (amongst many other actions). When pressing the “Run” [▶] button in Android Studio, adb is used to copy the resulting APK file to the device and install it.

Using ADB over a network

The ADB protocol can be used over a network, so long as it is enabled on the device, via USB, after each time the device has been rebooted. This can be accomplished by running an adb tcpip command to enable TCP/IP (network) access to ADB on the device. This is normally accomplished by running the adb tcpip command (specifying which TCP/IP port to listen on) from the command-line1, while the device is attached via USB:

adb tcpip 5555

Once ADB over TCP/IP has been enabled (in this case on TCP port 5555), any computer can be connected to it over the network by running an adb connect command (and accepting access on the device when prompted):

adb connect 1.2.3.4:5555

The IP address “1.2.3.4” must be replaced with the IP address2 of the Android device being connected to. Once the device is connected over TCP/IP, Android Studio can be used exactly as though it were connected via USB.

A big snag: The FTC Robot Controller uses WiFi Direct

This is where things get somewhat interesting, and specific to FTC robots. The FTC Driver Station and Robot Controller apps use WiFi Direct to communicate with each other. (And normally are disconnected from all other WiFi networks.) This establishes a private WiFi network between the two devices – so, normally, the two devices are not on the same wireless network as the PC where Android Studio is running. There are two solutions to this, but both involve getting the PC onto the same network with the Android devices.

Simple: Join the WiFi Direct network from the PC

It is possible to join the WiFi Direct network created by the FTC Robot Controller app from a PC. The name of the WiFi Direct network is usually known by the team because it’s based on the device name, which is visible in the FTC apps: something like “DIRECT-xy-1234-RC”3. If an attempt is made to join the network from a PC, though, a password is needed to do so. This password can be found using the “Program & Manage” screen in the Robot Controller app’s main menu.

Once the passphrase has been obtained, any PC (or other device) can join its network by selecting the Robot Controller’s network name from the list of WiFi networks on the PC, and using that passphrase for the WiFi password when prompted. Once the PC has successfully joined the WiFi Direct network, ADB can be connected using the Robot Controller’s WiFi Direct IP address (instead of the one obtained from the Android settings menu), which is always 192.168.49.1.

However, this poses a different problem: Now the PC is no longer on the Internet. If while programming, it’s necessary to communicate with team members, use Google to search documentation, or use GitHub to manage code, this becomes very awkward, and would require frequently switching networks, which defeats a lot of the point of this exercise.

More elegant: Add a second WiFi adapter to the PC

A PC is actually quite happy to coexist simultaneously on multiple WiFi (or other) networks, so long as each network has a different IP address scheme. The WiFi Direct network created by the Robot Controller uses 192.168.49.x IP addresses, so as long as the local home/work/school WiFi network uses some other scheme (10.x.y.z or 192.168.0.x are quite typical) then there will be no conflicts.

In order to join the second network, the PC will need an additional WiFi adapter, but fortunately these are quite cheap and very small today: see Appendix: USB WiFi Models for several available models.

After installing the drivers for the new WiFi adapter and plugging it in, simply join the Robot Controller’s WiFi Direct network using the above instructions, but using the new WiFi adapter instead of the computer’s main WiFi adapter. Once connected in this way, the PC should be remain connected to the main WiFi network, and should still have Internet access through that network, while also being able to communicate with the Android device over WiFi Direct.

One possible problem, however, is that the order in which the network devices are connected (or their priority as network adapters) can mean that Internet access may not be available while connected to the Wi-Fi Direct with the second adapter, because Wi-Fi Direct provides an Internet (default) route–even though the device doesn’t itself have Internet access–and the PC may try to use it instead of the other WiFi connection.

This, too, is fixable:

  • On Mac OS X, open the System Preferences and then the Network pane. Click the “gear” icon and select “Set Service Order…” and drag the entries to put “Wi-Fi” above the second Wi-Fi adapter (in the case of the TP-Link adapter, named “802.11n NIC”).
  • On Windows, this problem has not been observed.

Making ADB over TCP/IP easy to use with Android Studio

One additional problem with the above solution is the need to use the adb command – from a command line – to enable TCP/IP and connect to the device. However this is not entirely necessary, either. It can be made to be extremely easy to use in Android Studio!

Add several useful “External Tools” for ADB to Android Studio

Android Studio allows the creation of “External Tools”, which will appear in the main window’s “Tools” menu. These tools can do just about anything, but they can easily be used to run adb commands so that using the command line is no longer required.

In Android Studio, open the main settings panel:

  • On Mac OS, click “Android Studio”, then “Preferences…” (or simply press the hotkey “⌘,”).
  • On Windows, click “File”, then “Settings…”.

In the settings panel:

  1. Expand the “Tools” item
  2. Click “External Tools” to open the External Tools list. The list is normally empty.
  3. For each of the following tools below, click the [+] button, and fill in the provided fields (leaving all others unchanged). Once each tool screen is filled-in, click “OK” to save. (Note: The “Program” field is the same, so the value can be cut and pasted to avoid re-typing.)
  4. Once all tools have been added, click the main settings panel’s “OK” button to save.

“Enable ADB over TCP/IP”

Field Value
Name: Enable ADB over TCP/IP
Program: $ModuleSdkPath$/platform-tools/adb
Parameters: tcpip 5555

“Connect to ADB over WiFi Direct”

Field Value
Name: Connect to ADB over WiFi Direct
Program: $ModuleSdkPath$/platform-tools/adb
Parameters: connect 192.168.49.1:5555

Bonus: To program the device over a non-WiFi Direct network

The following External Tool is not necessary for programming FTC robots over WiFi Direct, but can be added in order to program any Android device via any other WiFi network. It will prompt for the IP address to connect to.

“Connect to ADB over TCP/IP”

Field Value
Name: Connect to ADB over TCP/IP
Program: $ModuleSdkPath$/platform-tools/adb
Parameters: connect $Prompt$:5555

Connect wirelessly to program and debug an FTC robot

Once the above External Tools are added, connecting to an FTC robot wirelessly to program it and debug it is trivial (after having used USB to program the device at least once4). After each reboot of the Android device (and it doesn’t hurt any other time), follow these steps:

  1. Connect the robot’s Android device to the PC via USB.
  2. Ensure that a file (such as an OpMode) is open and the cursor is in that window5.
  3. Click Tools → External Tools → “Enable ADB over TCP/IP” to enable ADB.
  4. Disconnect the USB cable from the Android device and ensure the computer is connected to the WiFi Direct network with its WiFi adapter.
  5. Ensure the “FTC Robot Controller” app is running on the Android device.
  6. Click Tools → External Tools → “Connect to ADB over WiFi Direct” to connect to ADB.

After the above steps, it may be useful to open the Android Monitor and ensure the connected device is selected in the device drop down (there may be a “[DISCONNECTED]” entry as well, from the previous USB connection; it is not the correct one).

Android Studio should work exactly the same as when it’s connected via USB: the “Run” [▶] button should transfer new APKs to the Android device, and Android Monitor will work even while the robot is running.

A bonus: Use Android Monitor logcat in real time!

Since the device can now remain connected via ADB while the robot is running… that also means that Android Monitor is usable while the robot is running. If the Android logging API (android.util.log) is used to log messages in a program, they will appear in the Android Monitor’s logcat in real time!

Appendix: USB WiFi Models

The author has purchased the below WiFi adapters and tested some of them in the course of writing this document. Reports of good or bad results with additional USB WiFi adapters is welcome either in the comments below or by email.

Nano USB WiFi Adapters

These adapters are small enough not to protrude annoyingly from a laptop computer, and should allow use of a laptop sleeve or case without removal of the device.

TP-Link N150 Wireless Nano USB Adapter (TL-WN725N)

Price: ≈$10 (March 2017, Amazon.com).
Works on Mac OS X and Windows. Have had many signal reception issues on MacBook Pro, possibly caused by antenna not protruding far enough from metal casing. Switched to D-Link DWA-131.

Mini USB WiFi Adapters

These adapters are small (similar in size to a USB thumb drive) but will have to be removed before use of a laptop sleeve or case.

D-Link Wireless N USB Wi-Fi Network Adapter (DWA-131)

Price: ≈$25 (March 2017, Amazon.com).
Works on Mac OS X and Windows. Excellent signal reception and no driver issues on Mac OS X. Appears as a wired-Ethernet adapter with a special app (in the status bar) to configure the WiFi network. Exactly the same chipset as TP-Link N150 (clone of the drivers and app).

NETGEAR AC600 Dual Band Wi-Fi USB Mini Adapter (A6100)

Price: ≈$31 (March 2017, Amazon.com).
Windows-only.

Linksys Wireless Mini USB Adapter AC 580 Dual Band (AE6000)

Price: ≈$28 (March 2017, Amazon.com).
Windows-only.

Happy wireless programming!

1 “Command Prompt” / “CMD” in Windows or “Terminal” in Mac OS.

2 An Android device’s WiFi IP address can be found by going to the Global Settings → “About phone” → “Status” and checking “IP address” field.

3 The network always starts with “DIRECT” followed by two random letters/numbers, followed by the device name. The device name is required by the FTC game manual rule <RS01> to match this pattern.

4 The FTC Robot Controller app is responsible for creating the WiFi Direct network, so if the app doesn’t exist on the device, it will not be possible to start it to connect over WiFi Direct. Connect the device over USB and program it that way the first time, start the app as instructed, and then wireless programming should work.

5 If the cursor is not in an Android-related file, running the External Tools from this guide may fail with an error about not finding “/platform-tools/adb” – because the $ModuleSdkPath$ macro used in the External Tool definition will not have been filled with the appropriate Android SDK path. To make the External Tool work with any cursor location, just replace the $ModuleSdkPath$ macro with its actual value, which can be found by clicking “Insert macro…” and selecting $ModuleSdkPath$. The downside of this solution is that if the path changes (for instance due to an upgrade), the External Tool entry may cease to work anymore.

Black History Month

[This was originally posted on Facebook, but has been copied here and backdated appropriately.]

This month – February – is Black History Month.

This month is not about me, but I hope that you will all bear with me for a moment and forgive me as I use the word “I” more than I should:

I was born in Tennessee – the American South – and despite many of my peers being people of color and various races, I was raised as a product of the white-centric American education system. That means, basically, that my understanding of black history amounted to little more than “we used to be mean to black people and call them names [whispering: and hang a few], but we stopped doing that a long time ago and made them EQUAL, and now they just like to do drugs and riot a lot about what happened in the past”.

I accepted this completely wrong “definition” of Black history (and present), not knowing any better, for a long time. Not because I thought it was right, but because it didn’t materially affect me. As an utterly privileged white male, I never really thought much about it. I accepted that it was normal to occasionally hear denigrating comments towards people of any color or of non-Christian religions – it’s the South, after all! I accepted that some of my family just “didn’t like black people”, and that was normal, right? I accepted that it was all just good fun, and everybody jokes, and jokes are harmless, right? I accepted that it was normal to hear people joke about “ebonics” or to mock religious practices or clothing.

I personally didn’t like it, and I attempted not to participate or encourage it, but I accepted it, and I admit that I certainly did participate on occasion.

I now accept that I was wrong, and that I can do better.

I contributed – even if primarily passively – to racism, to discrimination, to hurting people, and I refuse to do that or accept it from anyone else any longer.

I ignored or looked away or walked away far too often, and I refuse to ignore or look away or walk away any longer.

I ignored Black History Month, because I am not black. That was wrong, too.

Black History Month is not about or for black people celebrating black history – having a beer and toasting Dr. King, as I perhaps previously imagined – it’s for everyone (and especially everyone that’s not black). It’s about recognizing the impacts that everyone has had on black history, and especially how those impacts have molded and shaped what it means to be black in America. Many of those impacts have been negative and uncomfortable for white people like myself. Many of those impacts have been positive (and unfortunately often still uncomfortable for white people!).

This month is about recognition – both the joyous and the solemn kind. This month is also about, after achieving some recognition, offering unguarded praise and optimism for black innovation and advances, offering condolences for black sacrifice, shedding tears for black repression and suffering, and offering your heart to accepting and embracing Black History.

Black History Month is not about making blacks equal to whites somehow by giving them a month and marking it on everyone’s calendars. It’s about having the fortitude and compassion and sense to both accept the ugly past, and commit to making blacks and Black Future BETTER than your own. After all, by embracing each other, acknowledging and embracing our differences, and pushing each other higher, nobody actually gets left behind – we all rise up together.

You are black. I see that you are black. I love your blackness. I am sorry for everything. I love you. I will fight for you.

Join me… Invest in Humanity, too

In Invest in Humanity 2016 I introduced my project to “invest” an initial $60,000, by supporting groups/organizations all around the country, with a singular goal: to improve humanity. It’s still going strong, in fact we’ve now given about 75% of the budget—almost $47,000—to 118 different organizations. You can read a bit more and see the current list of organizations and causes we’ve supported at InvestInHumanity2016.com.

Will you join me, and Invest in Humanity, too?

I started this project as an experiment, and with the hope that I could inspire at least a few others to follow me, and invest in humanity along with me. It’s going to take a little bit from a lot of us to make a dent in really improving and furthering humanity. So now I’d like to put out a call to do just that: Will you choose to invest in bettering humanity? I’d love to see people join me at both ends of the scale spectrum:

If you can make one small donation to just one organization which helps/benefits people in other areas or circumstances, every bit helps.

If, however, you have the resources to do something bigger and grander… perhaps even similar to what I’ve been doing, I’d be happy to talk to you about how it’s worked and help you along, or even do much of the work for you. Feel free to reach out to me any time at jeremy@investinhumanity2016.com.

With all of your help, we can and we will build a society that is collectively better than any of us could be individually.

Invest in Humanity 2016

This being Thanksgiving Day, I thought I’d share something I’ve been working on for the past few weeks.

Just after the election, I wrote about the initial constructive steps I decided to take to combat the racism, sexism, misogyny, homophobia, xenophobia, and hate which dominated the 2016 election cycle. Although I initially wrote that post (and on Facebook rather than this blog) and took actions immediately due to my disappointment at the present state of the election, I knew that I wanted to do something bigger. Over the course of a couple of days of thinking it through, I formulated a plan and decided to call it Invest in Humanity 2016.

To that end, I set aside $60,000 (inclusive of my initial donations) to “invest” in causes far and wide which work to advance humanity. However, I also realize that the problems faced by different groups and the challenges known by people of different life experiences are not universal… so I knew I wanted to do something a bit unique to reach people I would not have reached by myself. I recruited several fairly diverse groups of friends (which I called “teams”), with their diverse experiences and gave each team an individual donation budget to manage. Each team has been fully responsible for finding causes they want to support, vetting them, and deciding how to support them and how much support they’d like to give. I’ve taken care of the bookkeeping and of course provided the funds. I’ve provided only very broad guidance rather than any rules or requirements for causes to support.

The teams have been busy! As of right now, we have supported 39 different organizations with a total of $21,850 in donations—but we’re just getting started.

The organizations we’ve supported so far include:

  • ACLU Nationwide
  • Alliance for Multicultural Community Services
  • Amaanah Refugee Services
  • American Humanist Association
  • Border Network for Human Rights
  • Center for Reproductive Rights
  • FairVote
  • Family Promise of Knoxville
  • Food Bank of Northern Nevada
  • Gender Diversity
  • Girls on the Run
  • Houston Food Bank
  • International Refugee Assistance Project
  • Kids In Need of Defense (KIND)
  • Knox Area Rescue Ministries
  • Literacy Advance of Houston
  • Mexican American Legal Defense and Educational Fund
  • NAACP
  • National Immigrant Justice Center
  • National Organization for Women
  • Natural Resources Defense Council
  • Our Center
  • Planned Parenthood
  • RAINN
  • Reno Works c/o Volunteers of America
  • Reproductive Health Access Project
  • Sierra Club, Lone Star Chapter
  • Southern Poverty Law Center
  • The FAYCO Foundation
  • The Love Kitchen
  • The Nature Conservancy
  • The Reno Initiative for Shelter and Equality
  • The Trevor Project
  • The Young Center for Immigrant Children’s Rights
  • Trans LifeLine
  • Transgender Allies Group
  • Transgender Law Center
  • UNR Resettlement and Placement
  • YMCA of Greater Houston

I’ve set up a small (and currently very simple) web site related to this effort at InvestInHumanity2016.com. If you’re interested in investing in humanity as well, please reach out to me. I’d love to hear from you. If you represent a charity or other cause (registered or not) and could use our support, please reach out as well!

A response to those supporting Trump based on his abortion position

[I have copied this content from my original post on Facebook, and have backdated it appropriately to maintain context.]

As for me, from the beginning I aligned much more with, and supported Bernie Sanders. I was very disappointed with the actions of the DNC in this election, and I was fairly cold on Hillary Clinton from the start (largely because she is, by anyone’s standards, a lifelong politician). Along the way, I could not have ever stomached voting for Donald Trump though, as he has made it very clear from the beginning that his positions on most everything: (a) tended to be made up on the spot based on his audience; and (b) generally amount to hating or denigrating different groups. I saw nothing of actual substance (especially that could also actually be believed) in his entire campaign, and I still haven’t since the election has closed.

I ended up aligning with and supporting Hillary Clinton in the end, and I did vote for her. I do feel that the DNC strongly pushed her, more than was probably wise, and certainly against their supposedly independent position, because they really wanted to be responsible for electing the first woman president. She has a very “unclean” past largely because of being *so* deeply involved in politics for *so* long, and due to of course being first lady to an ex-president. There are a lot of people with a lot of free time to hate her and Bill Clinton, and they’ve gotten her involved in so much scandal (and she’s gotten herself involved in enough) that regardless of how much has any merit it’s impossible to tell, objectively, how much is real. So I preferred mostly to stay away.

As for me, I would have preferred that our first woman president had a much cleaner/simpler past, so we could purely focus on her qualifications and actual positions, and deal with the inherent biases in our cultural and political system against women as leaders, as a single issue (essentially a woman version of Bernie Sanders would be ideal). Instead, of course, most of that was pushed to the side by all of the scandal, as real or imagined as it was.

Donald Trump, however, is a totally different case for myself and for many others who voted “anti-Trump”. The vast majority of those upset about his election are not upset due to his proposed policies per se (as weak and ill-defined as they may be), and are not upset because of accusations against him (based on fact or not), but based on things he himself has said (most often on camera), positions he has taken, and statements he has made about others, all on record and irrefutable. His oft-stated desires to forcibly deport all illegal immigrants, and to require registration for all muslims are frankly terrifying for many of us. His behavior towards women (ignoring all accusations and just focusing on things on record and irrefutable) is completely and absolutely unacceptable for any presidential candidate let alone president-elect of our country. And it’s those beliefs that drive their and my disappointment, anger, and ultimately actions (right or wrong).

I personally made the switch from being merely upset about Bernie Sanders’s seeming exclusion from the political process, to fully supporting (both mentally and financially) Hillary Clinton as a candidate (to defeat Trump) based on Trump’s comments, on video, towards a young (10 year old) girl: “I’ll be dating her in 10 years, can you believe it?” That was, for me, the tipping point, and the moment where I felt I had to switch from being on the sidelines, aghast that the man was still a serious candidate, to doing everything I could to try to ensure he didn’t become our president. If you think you can justify his remarks in that tape, I’d love to hear it. This was, of course, on top of the already lengthy series of previous remarks by him, indisputably, which range from questionable to what should have been immediately disqualifying.

I fully understand and sympathize with those who are having a bad time in modern America, are unemployed or underemployed, underpaid, or feeling like they don’t have opportunities to better their life. I can see why people align with the concept of the slogan “Make America Great Again”; they really want America to be great again, for them, today. The problem is that practically nothing proposed by Trump will have an actual impact to make their life great, again. The jobs those people used to have are never “coming back” as politicians often promise them, and the irony of the whole thing is that Trump, as a businessman, has had a lot more to do with their demise than he could ever do to reverse it as president. We’re not going to get back these jobs because there isn’t a market for their product at the price it would take to bring that job back, in America or elsewhere. Failure to follow this chain of thinking to its natural conclusion is dangerous and disingenuous.

It’s nice to say we’ll close the borders and wall ourselves off, and make it impossible to export jobs and import goods, we’ll forcibly remove all illegal immigrants, and anyone with a differing belief system or religion than “we” (white, Christian, America) understand. Then what? We’re suddenly great again? What’s the next step of this plan? Have we thought that far ahead? What’s next?

Republican supporters of either candidate in the previous elections did not riot when their candidates lost to Barack Obama, not because they are less “sore losers”, but because Obama’s candidacy and position was not based on hate, division, and demagoguery–it was based on hope, love, and bringing people together. And, had he lost to any typical Republican candidate, there would also not be rioting–losing a campaign based on love is not the same as winning a campaign based on hate. This time around, people are not upset that a Republican candidate was elected over a Democrat, that a man was elected over a woman, that their candidate lost, or *even* that Donald Trump (the man) was elected. They are upset that Donald Trump was elected in spite of (or possibly because of) his indisputable positions which amount to racism, sexism, hate, and divisiveness. They are upset that so many of our fellow countrymen were able and willing to support those positions, or at the least willing to ignore them to, in theory, get something else they wanted.

Illegal immigrants and muslims are currently the political bogeymen of today’s America, and because of that, politicians and constituents alike are able to treat them as abstract issues rather than as actual people. These are all complex issues which can’t be summarized into bumper stickers or campaign signs, so it’s tough to convey sensical positions on them. I think it is helpful though, for better context on the present day, to replace the current bogeyman in any present day argument with a bogeyman of (hopefully resolved) days past: how would Americans feel, today, on average, if we proposed to deport all Japanese, or require registration of all black people? I hope that those sound like crazy propositions to a modern American regardless of political affiliation.

(Yes, I realize that by definition, an “illegal immigrant” is also a criminal, in that their mere presence in the country is breaking the law. The societal, economic, and business implications of their presence is a lot more complicated than that, though. In order to keep this short, I will not go into any more detail here, but I’d be happy to discuss or debate further. I also realize that there will always be a hopefully small fraction of people who would say both of those proposals above sound “great”; but that’s not what I am arguing here, either.)

Back to the original question at hand in this thread, I do understand that one can be quite reasonable and totally against abortion of any kind. I know many people, who I respect, that take this position. I don’t agree with their stance, but I can respect that it is their belief.
However, if that is one’s stance, and one is going to vote based on that stance alone (ignoring ALL other opinions, policies, and positions of the candidate), I should hope that the candidate’s understanding of the issue would be much stronger than Trump’s is. I watched the debate live, and nearly choked during his answers on abortion because not only were his answers completely off base (borderline crazy), but he repeatedly (so it’s definitely not anyone misunderstanding him) and clearly displayed great ignorance of the entire issue.

Trump’s responses about “in the ninth month you can take baby and rip the baby out of the womb of the mother just prior to the birth of the baby” and “as late as one or two or three or four days prior to birth” (both direct quotes) are just buffoonery and blatant appeal to blind emotional reaction. (And of course, his statements previous to this debate including “punishing” women for getting abortions notwithstanding.)

On the other hand, Clinton’s responses were well reasoned and completely fair and honest. You may agree or disagree with her, but she holds a position which is at least backed by an understanding of the issue. Her position is the same as mine, basically (which was convenient for me, since Bernie was no longer an option): that abortion should be available to those that need it, and that there are various reasons for which it is in fact actually needed.

Personally, I support a multi-part approach with regards to abortion:

  1. Comprehensive (not “abstinence only”) sex education and open dialog.
  2. Easy and cheap or free access to contraception, without roadblocks such as parental consent.
  3. Easy and cheap access to emergency contraception such as “plan B”, again without roadblocks.
  4. Easy and cheap access to at-option early term abortion, again without roadblocks.
  5. Free access to all medical care, including of course pre- and post-natal medical care.
  6. Comprehensive social support programs for both mother and child (and for myself, all people generally).
  7. Access to abortion at any phase of pregnancy due to medical necessity.

With all of these in place, it’s possible to limit the amount of conception occurring in the first place, limit the number of abortions occurring due to accidental pregnancy (due either to ignorance of the process or availability of contraception), and ensure that any pregnancy regardless of cause is well cared for, and that the baby is born healthy and baby and mother can remain healthy. Unfortunately literally *all* of the above are antithetical to the platform of the Republican party. Their policies amount to, at best, hopeful ignorance, and punishment for all when that doesn’t work. The combination of denying all seven of the above are and have proven to be disastrous societally.

Claims like “in the ninth month you can take baby and rip the baby out of the womb of the mother just prior to the birth of the baby”, while they sound horrific, sound so because they literally *never* happen, theoretically legal or not. (Outside of mentally unsound people self-aborting their pregnancies, but I think we could agree that sort of thing will happen regardless of legality.) Not only would the mother have had, for some reason, to carry the baby that long and then change their mind, they will then have to find a doctor willing to perform such an abortion of a viable fetus based purely on the mother’s whim. Not likely, and it’s not necessary to make laws banning things that literally never happen, while bundling with those laws ones which place encumbrances on other practices that *are* done out of medical necessity.

I could actually understand if we had in place a society willing to widely embrace actual sex education and contraception programs, and we then *still* had some kind of abortion epidemic, and then religious groups wanted to take a more hard-line stance on it. We’re not there, though. If the groups so vocally opposed to abortion were also vocally supportive of (as opposed to obstinately against) sex education, contraception to avoid conception in the first place, and especially if they were also in support of medical care access and social support programs to support the baby during pregnancy and long after birth… then I would be much more sympathetic to their (and presumably your) cause. The current reality amounts to willful ignorance, hoping for the best, and punishing those that meet the inevitable outcome. I can’t support that and I am not sympathetic to those that advocate for it.

Combining the two issues here, and especially in light of the above, I cannot fathom support for Trump in spite of himself in order to “get” a harder stance on abortion and a hopeful overturning of Roe v. Wade. People are not rioting because they don’t understand, support, or sympathize with your cause, but because:

  • You’ve said, through actions and alignment, that the collateral damage of pushing through your cause is worth their lives–millions of them, who are alive today.
  • Widespread support of a candidate who so openly supports this level of racism, sexism, bigotry, etc. legitimizes and has and will continue to embolden those who also hold those beliefs, many to a much more extreme degree.

Hopefully this explains at least my position, and hopefully speaks for others in similar positions to myself. I’d love to debate anything here in more detail.

A constructive start for post-election 2016

[I have copied this content from my original post on Facebook, and have backdated it appropriately to maintain context.]

I don’t normally say much publicly about donating anything, and until lately about politics or social causes, either. I only really occasionally mention my support of loans through Kiva (mainly because it’s a long-running passion of mine). Today is a bit different, though; today, in honor of our democratic process, I thought a number of organizations could use a bit of extra help for the coming months and years.

So, as a constructive start, I’ve donated $1,000 each to the following organizations:

  • Planned Parenthood
  • Center for Reproductive Rights
  • Reproductive Health Access Project
  • RAINN
  • ACLU Nationwide
  • NAACP
  • Southern Poverty Law Center
  • The Young Center for Immigrant Children’s Rights
  • Transgender Law Center
  • Gender Diversity

If you, too, are looking upon the election outcome and wondering how the hell we got to this point of intolerance, overt racism, sexism, misogyny, homophobia, xenophobia, and hate, then I encourage you to find a few organizations that you can support, too, in whatever way you can.

I’m certainly not going to ask anyone to give all your money to the DNC (ugh), or run out into the streets with torches. I certainly don’t believe that a president Trump and Republican majority across the government will instantly be the end of the world, or even that half of the rhetoric upon which Trump’s entire disgusting campaign was based is even serious.

However, I do believe this is a clear signal from a large number of my countrymen that they support divisiveness over inclusion, fear over understanding, spectacle over reason, and hatred over love. And I can’t say I am surprised, but it leaves me dumbfounded and heartbroken. Not for Hillary Clinton’s loss–I could have easily supported any other serious candidate on either side without much regret–but for the loss of the dignity of our country. And, not even the loss, but the recognition of that loss, or the realization that that dignity was a farce all along.

This is not what *I* stand for, it’s not what I want my children to grow up with, and certainly not what I want my grandchildren to face. We can do a hell of a lot better. Why don’t we even bother trying? Why can’t we get past the color of a person’s skin, or the gender of a person as an authority figure, or the religion practiced by another person? How do we have so little compassion for others? Why do we continually act in a self-serving way and abuse others? I struggle to accept that the human race is just incorrigibly terrible, but I don’t see anything materially changing, either. I want more than anything for America to be a positive example to the world, but we just keep proving that we don’t have the courage for it.

While I fully respect the democratic process that allows for a country to be cast in whatever way its constituents decide, I am sure I don’t have the stomach to sit idly by while it is cast in *this* way. The fact that it has even gotten this far gone makes me feel physically ill, and doubly so because I know or am related to so many of the people who have made it so.

So, I won’t stomach it anymore. If you’ve ever claimed “Obama is a muslim” or “but he’s black”; if you’ve called someone a “nigger” or “sand nigger” or “towel head” or “wetback”; if you’ve championed from your sofa to restrict the rights of women or called Hillary a “bitch”, or made any reference to her inability to serve due to being a woman; if you’ve called someone a “fag” or “dyke” or “tranny”; seriously: fuck you.

Yes, I know that includes quite a number of people closely related to me. Sorry, but I am not sorry. This has to stop.

Look inside yourself, ask yourself: Does this make you a better person? Why do you do it? Do you truly believe that you’re just better than these people? Can you defend your ideas and ideals? Can you defend your choices? Can you defend your sense of decency?

Thanks, Oracle, for fixing the stupid and dangerous SET GLOBAL sql_log_bin!

As of MySQL 5.5.41, released on November 28 (last week), Oracle has fixed MySQL Bug 67433, which I filed on October 31, 2012 and wrote about 4 months ago in Stupid and dangerous: SET GLOBAL sql_log_bin. You can see the fix in Launchpad revision 4718.

The MySQL 5.5.41 release notes mention:

Replication: The global scope for the sql_log_bin system variable has been deprecated, and this variable can now be set with session scope only. The statement SET GLOBAL SQL_LOG_BIN now produces an error. It remains possible for now to read the global value of sql_log_bin, but you should act to remove from your applications any dependencies on reading this value, as the ability to do so will be removed in a future MySQL release. (Bug #67433, Bug #15868071)

Thanks for addressing this and making the world’s data (and DBAs’ jobs) a little safer, Oracle! Special thanks to Morgan Tocker (MySQL Community Manager at Oracle) who cared about it enough to keep pushing it through to a reasonable fix/resolution.