Saturday, July 25, 2020

Against Decimation

There's been a lot of talk recently about "cancel culture". To pick a prominent recent example, the firing of David Shor seems to have bothered almost everyone - even skeptics of the idea of "cancel culture" seem to mostly think that firing a data analyst for sharing a respectable academic study about how the public reacts to protests was awful. And this isn't the only one - there are lists of many dozens of well-publicized examples out there(here's the best such list I've come across).

This debate really stepped into high gear online with the release of an open letter in Harper's magazine, signed by over a hundred prominent people.  Since then, there's also been a poll of Americans which shows that there's real public concern, on all sides, over this issue. And there's cause for real concern too. A majority of people worry about expressing their views, a majority want to get other people fired for expressing opposing views, and there's a non-trivial amount of overlap between the two groups. And while the left seems somewhat worse, the right is still pretty bad.

Unfortunately, "cancel culture" is a pretty ill-defined term in many ways. Let's look at the Shor case. Is the key part the firing? The fact that it was a left-wing group that got him fired? Was the criticism he got before-hand "cancellation"? How about the part where he got kicked off an email list? That doesn't affect his livelihood, after all.

This is also made more complex because it doesn't take a lot of pressure to really clamp down on people's behaviour. Note that systems like China's "social credit" are largely about going after comparatively small parts of people's lives (buying train tickets, etc.) in order to keep minor dissent down. If you threaten jobs, you'll naturally get even stronger reactions.

If a view has 20% support, and you think people need to be fired for expressing it, you're advocating for 20% unemployment if people aren't cowed. This is awful, but it's also worth noting that it won't even work. You'll merely divide society between those who employ the left and those who employ the right. (This is a big part of why we have Fox News.) So you're basically just exacerbating tensions for no real long-term gain.


There's some real tension here, between encouraging speech but not encouraging toxic speech, advocating social consequences but not overly severe ones, and a host of other issues. And like all balancing acts, it's tough to get it exactly right. But I think I have a fairly good set of rules that would prevent the worst of it on all sides.

1. People are always allowed to disagree with anything you say, and you should expect them to do so. Simple verbal disagreement(even by large numbers of people) is not "cancellation", and should not be treated as a threat by itself. You need to be able to deal with it.

2. Violence in response to speech is always wrong. This includes inciting others to be violent on your behalf, or credible threats of violence.

3.  Getting people fired in response to speech that's not directly related to their job is usually wrong. In order to be an exception, I think you need to meet the following criteria:

a) The speech must be significantly unpopular. If you start firing people en masse for supporting Biden or Trump, you're basically trying to declare half of society anathema. I would suggest a rule of thumb of 10% support. This is well above the margin of silly responses on polls, so a view that hits 10% actually has real-world support, and it's above the level where the truly loathsome views get to (e.g., open neo-Nazis). But it's well below the level where you'd be opening mainstream views up for cancellation. It's also a convenient round number.

b) More specifically, it must be that unpopular at the time. Dredging up old people's letters to the editor from 1957 about how they were worried about interracial marriage does no good, because they've probably changed their opinions since then, and because you're punishing people for something that wasn't seen as wrong when they did it. There's a reason every decent constitution bans ex post facto punishment.

c) The speech must be truly offensive. Thinking that the world is flat makes you a crank, but it doesn't affect your ability to flip burgers or balance a ledger.

d) And, most importantly, the speech must be theirs. Don't go after people over something their kids or parents wrote - guilt by association is a terrible system.

4. Boycotting and ostracism over speech is often wrong. I won't tell you how to spend your money or who to be friends with, and I won't impose rules as strict as the above on who you ought to support. But stop and consciously consider whether the offense is large enough to justify the response. For boycotts in particular, remember that a firm keeping someone employed is not generally an endorsement of their views, unless they're the firm's spokesperson or CEO.

5. If you have to think about whether you're being a dick, you probably are. Stop and reconsider.

6. Be (sanely) courageous. If someone's speech is threatened, stand up for them if you think you can. This may come at some cost to you, but if nobody will pay that cost, we all lose.

It's important to note that these are not rules any societal agency can enforce. Government will pass no law on this topic, and despite point 6, employers will likely not save people's jobs based on this reasoning. These are rules of how you should act. And, more to the point, these are rules of how I will respond to your cancellation efforts, and how I will try to conduct myself.

That said, I think they're good rules. I haven't seen any better ones out there. And I'll encourage everyone to follow these rules. Stop trying to destroy the 10%.

Saturday, January 18, 2020

Balancing the US budget

As a conservative political geek, you hear a lot about the importance of governments balancing their budgets. This is good and proper - fiscal responsibility is a core conservative value - but I think we sometimes make the error of glossing over what's involved in making that happen. Balancing the books isn't supposed to be something we yell at the other side about, it's supposed to be something that we actually try to do. But like a lot of things in politics, it's a lot easier to yell about how the other guy should do it than it is to do it yourself. Since I don't like it when either side acts superior or demands things from others that they can't do themselves, I want us to actually understand what we're asking for, and know how we'd do it.

On this basis, I posted a challenge to balance the US federal budget in a Facebook group a few days ago. (I picked the US budget because the group is mostly American, and because the available data is far better than the Canadian budget). And naturally, as with most of the times I post this sort of thing, I did it and nobody else even tried. It seems like it'd make an interesting long-form blog post, so I figured I'd adapt it to here.

A few notes before we get started.

1) This is really damn hard. The Americans are running a deficit of over a trillion dollars a year, or about 23% of all the money they spend. A lot of the comments I got there were astonishment at how harsh the changes I was proposing were, but frankly I thought I was gentler than was likely to actually happen in practice if someone did demand the deficit get fixed tomorrow.

2) This is going to be ham-fisted. I do not have the full US budget breakdown, and even if I did, I don't have the time or interest to dig into it in the necessary level of detail. I tried to make it realistic-ish, but this cannot be taken as an actual plan that should be implemented by anyone in Congress. And while I tried to make it reasonable, there's probably some stuff here I'd change on a closer analysis even if I didn't have access to any new data sources - this took me a while, and I probably dropped a few balls while I was juggling my priorities.

3) I'm not actually advocating this. Because it's so ham-fisted, and because the impact would be so jarring, I can't say that making the changes I outline below would be a good plan. (The first group might be, but anything beyond that is more scary than pleasant to think about.) This is a thought exercise, not a policy proposal. I want to know what serious cutting looks like, and I want to get a sense of how bad things are, so I know when it might be best to stop pushing for a while.

4) For the same reason as #2, this is going to assume a static analysis of the 2020 budget numbers. I am not the CBO, and I do not have access to models detailed enough to estimate second-order effects of all these changes. In practice, you could safely assume that they'll do a few hundred billion of damage to the bottom line, and leave the county with a deficit like the Bush years. Modest by comparison, though still a bit scary overall. In reality, this would require a substantial phase-in period, but for the sake of this analysis we're assuming that the phase-in has already happened.

5) I'm not making major changes to anything outside of the budget here. We might want to say that(e.g.) they could cut prison spending by legalizing weed, or improve social security's balance by investing their trust fund in the market, but those aren't budget changes, so I didn't consider them.

6) For brevity, all dollar values are in billions, and I've merged some categories. I've rounded things off (the official stats are in millions), but at the level we're working at, the differences are immaterial.

All values are taken from the official GPO budget tables, except where other sources are linked. Section 2 is tax revenues, section 3 is spending.

The Status Quo
DEFICIT: $1,101

Revenue breakdown:
Personal income taxes: $1,824

Corporate income taxes: $255

Social Security/Medicare taxes: $1,295

Excise taxes: $109
Alcohol/Tobacco: $23
Obamacare insurer/device taxes: $17
Gas taxes: $43
Airports: $17
Other: $9

Other: $161
Estate/Gift taxes: $19
Customs fees: $48
Fed deposits: $49
Other: $45

Expense Breakdown:
Defence: $738
Personnel: $163
Ops & Maintenance: $290
Procurement: $139
R&D: $100
Atomic energy defense activities: $25
Other: $21

International Affairs: $53
Humanitarian aid: $25
Security aid: $14
Conduct of Foreign Affairs: $13

Science, Space, and Technology: $35
Science: $13
Space flight: $21

Energy: $4

Natural Resources/Environment: $44
Water: $11
Conservation and land management: $13
Recreation: $5
Pollution control: $7
Other: $8

Agriculture: $19
Farm subsidies: $14
Research: $6

Commerce: $-5 (yes, that's negative)

Transport: $101
Ground: $66
Air: $22
Water: $12
Other: $1

Community and Regional Development: $36
Disaster relief: $21
Other: $15

Education and social services: $112
K-12: $43
University: $39
Social services: $19
Training: $7
Other: $4

Health: $1,301
Medicare: $685
Health care services(Medicaid, mostly): $572
Training: $39
Health&Safety: $5

Income Security: $514
Federal employee retirement: $152
Unemployment: $31
Housing assistance: $50
Food assistance: $79
Other income security: $196
Other: $6

Social Security: $1,107

Veterans: $218
Income security for veterans: $110
Healthcare for veterans: $86
Other: $22

Justice: $69
Law enforcement: $37
Litigation and justice activities: $17
Jail: $7
Criminal justice assistance: $9

General government: $32

Debt Interest: $479

Offsetting receipts not included above: $-110 (again, negative)

First Pass - The "Easy" Stuff
For my first pass through the numbers, I made a bunch of changes that I think are actually justified on policy grounds, or at least generally reasonable ways to save money without wrecking things too badly.

- Kill farm subsidies: $14.

- Push education down to the state level: $112.

- Raise gas and airport taxes to equal the related transportation spending: $28.

- Reduce military spending on most things down to 2017 levels (but not R&D or procurement - tech advantages matter): $73.

- Raise Social Security taxes to be high enough to pay for the program's costs long-term(by hiking rates, not the cap on earnings to be taxed): Per the trustee's report, this is a long-term shortfall of 1% of GDP, or about $193, so we'll say that.

- Raise taxes on the rich enough that normal people don't rebel at that last provision. About 17% of national income is earned over the cap(note: 2014 numbers, so it might be a bit higher today), and we'll tax it at a bit higher a rate than the SS tax hike, so say $50.

- Find 5% of the budget to cut in everything except Social Security and debt interest(and the above-cut programs): $148.


A separate analysis of tax credits, based on this excellent list of existing tax credits, shows me that there's not a lot of money to be had in tightening up loopholes, but it did find me two provisions I'd be happy to change.

- I'd eliminate estate and gift taxes, but also eliminate the step-up basis on capital gains at death and the carryover basis on gifts. Instead, I'd move to the Canadian system, where death is a deemed disposition. I'm going to make the (likely oversimplified) assumption that these provisions are the only ones affected, so the $19 estate tax revenue is lost in exchange for a $52 capital gains tax at death and $3 on gifts, for a net positive impact of $36.

- Deductions for muni bonds and state and local taxes are silly. $32 in new taxes.

SUB-TOTAL: $686, leaving a deficit of $415

This deals with over half the deficit, but we've used up all of the big headline changes that can be made easily.

Second Pass - Cutting Spending, The Nitty-Gritty
In the first pass, I've done a lot of the fixing with a heck of a lot of tax hikes - $339 of tax hikes, compared to $347 of spending cuts - so I want to focus more on spending cuts for a while.

- Federal employees are pretty numerous - about 2.2 million civilians(see section 16 of the budget tables). Cutting their compensation packages somewhat ought to be doable in the context of a change this large. Let's say we can cut their average all-in compensation (including benefits) by a few grand each. That saves us maybe $7. (Side note: This is a far lower percentage of government expenses than I'd have ever thought. If they all make $100k in total compensation, it's still less than 5% of federal outlays)

- I suspect international aid is probably somewhat too rich for the blood of a nation cutting spending like this. Let's trim it by a quarter, and save $10.

- Environmental policy is important, but there's no way current regulations and spending is done well at all. Cut everything by a quarter, save $11.

- I know healthcare is even more of a third rail for the federal budget than social security, so I'll tread lightly. (I kind of want to raise the Medicare age, but I'd get immolated just for musing about it, so no). The 5% cut imposed above is probably about as much as I could really squeeze it. But I'll drop the training budget by a quarter, and save $10.

- I love science and space flight, but the federal government can't reasonably spend as much as they are. Again, knock off 25%, save $9.

- I excluded military R&D and procurement from the "back to 2017" hammer above, but I don't think I can maintain that. Knock them back down, and after the 5% cut above save $63.

- I'll 2017-ize a lot of other categories as well - stuff that's grown in recent years without any cause I know of, and which can reasonably be pared back by the last few years of growth. (I know this process excludes the impact of inflation and population growth, but that's why they call it "cutting").
> agricultural research
> the USPS
> "other advancement of commerce"
> community development and area development (whatever makes those two separate line items)
> "other income security"(which has grown when all other welfare has stayed flat or dropped)
> income security for veterans (ditto)
> justice, and
> general government.

That's another $82 after the 5% flat cut above.

SUB-TOTAL: $192, leaving a deficit of $223

Third Pass - Grasping Nettles

There's a few categories I've been consciously trying to exempt from my cutting thus far. In particular, welfare and seniors welfare(Social Security/Medicare). While businesses and workers should hopefully be able to adjust to changes, the very poor and retirees are less able to do so. They have minimal income, and thus can't easily cushion themselves. I think I can eliminate the deficit without hitting welfare spending any more than I have above, but seniors can't keep getting a pass. SS and Medicare are 42% of the budget, and so far they've only been 6% of my spending cuts (there was the flat 5% hit to Medicare, for $34). That will have to change.

- Surprisingly, raising the eligibility age isn't the fix here. It's age 67 for SS(nominally), but making Medicare also age 67 will help less than I expected. The CBO has an analysis, and while it doesn't give annual details out to age 67, the age-66 effect would be $5 in improvement to the deficit (because most of the savings would be lost to Obamacare subsidies, or net tax impacts). So let's say we get the same from the extra year, and pushing it to age 67 will save us $10.

- That means we're means-testing. If we implement a clawback designed so that the top 5% of earners lose their benefits entirely and the next 10% lose an average of half, that saves us 10% on the budget for each. That's $175.

SUB-TOTAL: $185, leaving a deficit of $38

With that, cuts to SS/Medicare are now $219 billion, or 30% of total spending cuts. This is still on the low side compared to their share of the budget, but I think that's proper policy - they shouldn't be expected to carry as much of the burden as working-age people.

While I'm grasping nettles, let's do this right. Employer health insurance being tax deductible is a $215 tax hit. I don't want to unwind that totally, but I think 10% inclusion is reasonable - if your employer spends $10k on your group benefits, you're taxed as if you earned $1k. If nothing else, this should help make people see what the cost of the benefits is. This is $22 in new revenue.

One I was eyeing earlier is a tax credit for increasing research expenses. I think that might be a good target - it's probably a lot of admin overhead for companies, and this sort of thing is usually just a way for politicians to talk about how they're supporting the economy. Besides, the left will go crazy if we don't hit corps at least a little bit. That's $16 if we axe it.

SUB-TOTAL: $38, leaving no deficit!

The Results

Total spending cuts are $724 billion(15.2% of the budget), and total tax hikes are $377 billion(10.3% of federal taxes). The new federal budget is $4.022 trillion per year. And I'm being strung up by an angry coalition of government employee unions, socialists, anti-tax crusaders, seniors, soldiers, and modern monetary theorists. Isn't life grand?

TOTAL REVENUES: $3,645 > 4,022
TOTAL SPENDING: $4,746 > 4,022
DEFICIT: $1,101 > 0

Personal income taxes: $1,824 > 1,929 (high earners tax, muni/SALT elimination, employer health insurance deduction down to 90%)

Corporate income taxes: $255 > 271 (ending research expansion tax credit)

Social Security/Medicare taxes: $1,295 > 1,488 (SS breakeven tax hike)

Excise taxes: $109 > 137
-Alcohol/Tobacco: $23 > 23
-Obamacare insurer/device taxes: $17 > 17
-Gas taxes: $43 > 66 (pay for ground transport)
-Airports: $17 > 22 (pay for air transport)
-Other: $9 > 9

Other: $161 > 197
-Estate/Gift taxes: $19 > 55 (in cap gains taxes)
-Customs fees: $48 > 48
-Fed deposits: $49 > 49
-Other: $45 > 45

EXPENSE BREAKDOWN: (All cut by 5% unless otherwise stated)
Defence: $738 > 568 (all 2017'd)
-Personnel: $163 > 137
-Ops & Maintenance: $290 > 233
-Procurement: $139 > 99
-R&D: $100 > 65
-Atomic energy defense activities: $25 > 19
-Other: $21 > 15

International Affairs: $53 > 39
-Humanitarian aid: $25 > 17 (extra 25% cut)
-Security aid: $14 > 10 (extra 25% cut)
-Conduct of Foreign Affairs: $13 > 12

Science, Space, and Technology: $35 > 24 (extra 25% cut)
-Science: $13 > 9
-Space flight: $21 > 15

Energy: $4 > 4

Natural Resources/Environment: $44 > 31 (extra 25% cut)
-Water: $11 > 8
-Conservation and land management: $13 > 9
-Recreation: $5 > 3
-Pollution control: $7 > 5
-Other: $8 > 6

Agriculture: $19 > 4
-Farm subsidies: $14 > 0 (killed)
-Research: $6 > 4 (2017'd)

Commerce: $-5 > -19 (USPS and other advancement of commerce 2017'd)

Transport: $101 > 96
-Ground: $66 > 63
-Air: $22 > 21
-Water: $12 > 11
-Other: $1 > 1

Community and Regional Development: $36 > 29
-Disaster relief: $21 > 20
-Other: $15 > 9 (2017'd)

Education and social services: $112 > 0 (all moved to states)

Health: $1,301 > 1,147
-Medicare: $685 > 572 (means testing, eligibility at age 67)
-Health care services(Medicaid, mostly): $572 > 543
-Training: $39 > 27 (extra 25% cut)
-Health&Safety: $5 > 5

Income Security: $514 > 467
-Federal employee retirement: $152 > 144
-Unemployment: $31 > 29
-Housing assistance: $50 > 48
-Food assistance: $79 > 75
-Other income security: $196 > 165 (2017'd)
-Other: $6 > 6

Social Security: $1,107 > 996 (means testing, but no 5% cut)

Veterans: $218 > 185
-Income security for veterans: $110 > 82 (2017'd)
-Healthcare for veterans: $86 > 82
-Other: $22 > 21

Justice: $69 > 55 (all 2017'd)
-Law enforcement: $37 > 28
-Litigation and justice activities: $17 > 14
-Jail: $7 > 7
-Criminal justice assistance: $9 > 6

General government: $32 > 23 (2017'd)

Debt Interest: $479 > 479 (no 5% cut)

Offsetting receipts not included above: $-110 > -117 (cut to federal employee compensation included here)


And, as one final note, I'd like to point out that the Transportation budget has four categories - Ground, Air, Water, and Other.

What the hell goes under Other?

The other three match three of the four classical elements, so is this the federal investment in Floo powder?

Saturday, March 16, 2019

Freedom's Responsibility

For anyone who hasn't heard the news, a bunch of racist assholes attacked a pair of mosques in New Zealand, killing (last I heard) 49 people. Complete with a live video feed, creepy racist manifestos, and all the other accouterments of terrorist murderers everywhere.

Naturally, the world arose in near-unanimous condemnation of this horrible crime, and rightly so. But I've noticed one thing in the responses gathering a lot of attention - a lot of politicians (mostly on the right, sad to say) seem weirdly reluctant to use "Muslim" or "mosque" to describe the victims. A typical response that got a lot of flak was the pair of tweets from Tory leader Andrew Scheer. The focus is on freedom of religion, not on racists massacring Muslims.

The implication is that this is about fitting this tragedy into their worldview, which has a distinct emphasis on freedom of religion(especially for Christians - almost exclusively for Christians, if you look at the examples that many of these people will inevitably pick. See, for example, Bernier's painfully bad tweet). But it's not about the actual victims, the 49 dead Muslims who were murdered for praying in a mosque.

The flip side of this is the left's view, where it's all about Islamophobia, and freedom of religion is nowhere to be seen. For example, Jagmeet Singh's response. This likewise fits into their worldview where Islamophobia and white supremacy are major threats to the body politic, so likewise it'll naturally be their focus. It's unusual for me to say this, but the left is acting better here, on the whole. They're actually condemning the killers and the ideology that spawned them, and that's the first thing that should happen in any awful crime like this. The root cause of murder is murderers, full stop. (Would that they behaved this way all the time, but I'll give credit when credit's due.)

It really bothers me how badly people are dropping the ball on religious freedom, though. All the discussion I've seen today about this, and about the ham-fisted posts from right-leaning figures, has focused on how they're using freedom of religion as a dodge, a way to avoid taking their ideology the blame for this, and a way to co-opt the tragedy to talk about their pet issues. And a lot of them totally are. But in so doing, they make it seem like religious freedom is just a tool to defend their own beliefs from attack, not a critically important general principle. (Though the limits of Twitter as a medium are also apparent here - when simply typing the word "Muslim" is over 2% of your entire post length, sometimes people might cut it for brevity with no ill intent.)

Religious freedom isn't about the right to choose between boring mainstream denominations like Catholic and Lutheran. The modern concept of religious freedom traces back, at least in part, to the Peace of Westphalia in 1648, which ended one of the bloodier wars in history. For thirty years, Europe had torn itself to shreds, in large part over religious hatreds. This was an era where you could easily be forced to convert at the point of a gun or sword several times in our life, and where wars were fought over and over again about which religious doctrine would hold sway. The result was a shattered region, some eight million dead bodies, and a general agreement that it simply wasn't worth it to fight a death struggle over religion.

Religious freedom is about the right to choose between Catholic and Lutheran in Europe, in 1648. When they weren't "boring" at all, but were instead sparks that led to major international warfare. When your nation could be ransacked for choosing the wrong language for your Bibles, the right to choose it was a real and important right, and protection of it was key. That conflict has long since died away, and excites no serious passions today. But the principle still matters, because other religious conflicts can kill people just as dead even today. Especially today, as we saw in New Zealand.

A tweet about religious freedom that avoids mentioning Islam and co-opts it to be about Christianity is doing a disservice to everyone involved. Religious freedom is important because it protects Muslims too. In the modern developed world, Islam is "scary" in the sort of way that Lutheranism was "scary" in 1640s Italy - not because it's somehow inherently bad, but because a lot of people worry about it.

Freedom of religion isn't about the denomination itself. It's about freedom of opinion, of conscience, and of belief. It's about taking those cherished freedoms and applying them to everyone, even when we find their views odd. I don't doubt that there are people out there who aren't true Islamophobes, but who find Islam confusing and a bit scary nonetheless. But religious freedom is the principle that even when you think a viewpoint is bizarre or a bit offensive, you let people have it. You don't persecute them, you don't try to kick them out of your society, and you sure as hell don't massacre them by the dozen.

Using "freedom of religion" as a club to advance the interests of your personal religion is a great way to throw away the moral authority of impartial protection of human rights. You take something we've slowly worked towards for centuries and burn it away instead of building it up. The moral authority of freedom of religion won't protect you from your critics if you refuse to extend those same protections to those you criticize(or want to criticize, if you thought you could get away with it).

The left has the correct explanation for today's tragedy. But the right has the correct path forward - respecting the right of people to hold any view they want to hold, and participate peacefully in society. I just wish the sort of right-leaning figures that I'm thinking of would realize that they had the right answer and act accordingly, instead of acting like cheap partisan hacks with something to hide. It'd work a lot better if you were giving something up to build the principle that will defend you, instead of just having your hand out to collect all the goodwill that's been invested by other people over the last 400 years.

Saturday, March 10, 2018

Tales of an Amateur Dev

I've dabbled in coding before, but never done anything serious - the biggest project I've ever worked on was a version of Risk I coded in Turing for a highschool class back in 1999. But it's always been something that's interested me, and it's possible that my career might take me in that direction somewhere down the line, so it's a skill set I've wanted to build for a while.

A project just came across my horizon that I think I'm going to work on - basically, it's an application for a tabletop game, but one that can get very complex by the time it's done due to the number of different advanced rule sets/unit types/etc. that are available in this game. This project is really ambitious by the standards of my current skill level, and it may well be beyond what I can do well. However, even if I fall out halfway through I'll probably learn a ton, and if it succeeds there may even be a second income stream in it for me.

This blog post will be rather different than anything else I've posted here, but if you want to see my ramblings and false starts, come join me. This is intended to be something of a notebook of my experiences, as well as perhaps being a useful guide to anyone else who wants to follow in my footsteps.

Project Overview

The game I'm building for is BattleTech - it's a tabletop wargame, based around giant stompy death robots, but it's got add-ons for everything from infantrymen to two million ton space battleships. The goal for the intial version is to be able to make units of the most common types, with a convenient and modern UI. Once that's complete, more unit types will be added, as well as more utilities that players may value - the ability to turn individual units into larger forces, the ability to organize the logistics for those larger forces, the ability to build their own imaginary factions and select common designs and the like for them, and so on. Once that's done, I'd ideally like to integrate a rules database, fictional references lookup, and so on. All of this should be easy to use for an end user - just a simple download-and-install, no need to set up a Java environment or anything.

In a perfect world, this program ought to run on all major OSes(both desktop and mobile), be easy to integrate new expansions into, take input and provide output in all the most common formats used by players, and be superior in terms of both usability and breadth of options to all its competitors. Obviously, this is a hell of a request list, and I don't anticipate it'll happen right away. For one, having the same program work on desktop and mobile is a nightmare - that was what Windows 8 was built for, and Windows 8 was a failure. If Microsoft can't do it, neither can I.

So, the architecture seems like it ought to be divided into three parts.

  • The database, which contains all the various units, weapons, rule write-ups, and so on. 
  • The back end, which does the actual calculations, output to other programs, and the like. 
  • The front end, which gives the user an interface to make everything actually happen. 
As I understand it, the database and back end should be universal, as long as I pick the right tools. The front end will be extremely different on desktop and mobile, but as long as everything is properly modular, that's the only thing that should need to change. I'll be starting with desktop, as it's both more forgiving and easier to test. 


I've started this project with the intention of using C# as the primary coding language, building it within Visual Studio's free Community edition. There's a good selection of libraries and support tools, I have some experience with both language and environment, and it seems that the expansion to other OSes is fairly easy(from what I've read, Xamarin for Visual Studio will let you turn C# code into iOS/Android apps, which looks like an easier transition to mobile than any other I've come across). 

For the database, my intention is to use SQLite. I don't have much experiences with databases of any sort, but it seems to be the de facto standard for building a relational database into an application without need for any central database server. And again, it's very well supported, and free to use. This is a Visual Studio plugin that seems to implement it. (Edit: Nope, that's a bunch of tools, but not the actual implementation. I'll update this when I find what I want.)

Getting the same version to work on Windows, Mac, and Linux systems ought to be possible, and a helpful soul pointed me in the direction of wxWidgets, which seemingly has a C# version. I don't know exactly what I'll be doing here, but that seems like a promising lead. 

Any of these may turn out to be mistakes, but I'll start there and see what happens. 


Designing something that's intended to be this thoroughly expandable is a challenge I've never dealt with. Most of the time I've just done straight A to B programming, brute-forcing things freely and hard-coding all over the place. Doing long-term maintenance on a few workplace projects has started to move me away from those habits, but I'll need to jump far, far away from them for this to work right. 

The plan right now is to use plain-text definition files of some sort, one for each different type of unit. Those files will create a list of things the unit type must have and a list of what they may have, with caps on each(e.g., you can only have one engine, but you can have dozens of weapons). These will be as soft-coded as I can manage, because the number of optional rules and add-ins means that anything I hard-code will need to be torn apart and replaced down the line. 

The structure of the database will also be a big concern. A lot of things can be used on many different types of units, so making sure that the database that stores them is properly set up for flexibility down the line will be quite important. I think each "class" of weapon(infantry, mech, artillery, naval, etc.) will have its own table, and each sub-class(e.g., all AC/2-class weapons, of which there are several types with overlapping ammunition options) will be given a label within that class. Special rules that apply to some weapons, or some ammo types, will have their own table, and a many-many relationship will be set up between them to keep it all straight and prevent inconsistencies from sneaking in. Ideally, each rule should be defined exactly once, and everything that uses it will just reference the master entry. 

Getting Started

To start, I downloaded Visual Studio, installing the ".NET Desktop Development" package. It was about a 3.5 GB install. The list I originally wanted (with Xamarin etc.) was close to 40 GB, so I figured I'd hold off on those to avoid blowing up my internet's download cap. 

Once I got it downloaded, I created a project as a "Windows Forms App (.NET Framework)", as that seems to be a decent UI option from a quick Google image search. I needed to create a new folder outside the Visual Studio folder to store the actual project in, as my original attempt to make a sub-folder was blocked. I made sure to tick off the option to add it to version control, as a VCS is a must for any kind of serious coding - it seems to use Git, which I've dabbled with before, and which is as good as any. Once that was done and I was properly into Visual Studio, I installed the SQLite plugin through the extensions manager and rebooted the program. 

The crazy part is that this has been a big focus of mine for the last day and a half, but after all this work and planning, I still haven't written a single line of code yet. But I know where I'm going, and I have some reasonable-sounding ideas for how to get there. Let's see how this goes. 

Sunday, February 11, 2018

Predictions for 2017 - Analysis

One of the first posts I made on this blog was a set of 50 predictions for 2017, each with probabilities attached. Now it's time to see how I did.

1) Maxime Bernier will win the CPC leadership - 50%
Result: WRONG. Close, but wrong.
2) Kellie Leitch will not win the CPC leadership - 80%
Result: RIGHT. Given how she actually did, I actually feel under-confident here.
3) There will be 5 or fewer candidates on the final CPC leadership ballot - 60%
Result: WRONG. I misunderstood the process, and didn't realize how little reason to drop out there was, or how early you had to drop out.
4) Jason Kenney will win the PCAA leadership - 90%
Result: RIGHT.
5) The PCAA and Wildrose parties will not have begun any official merger process - 70%
Result: WRONG.
6) There will be no Danielle Smith-style defection of multiple Wildrose MLAs to the PCAA(or vice-versa) - 90%
Result: RIGHT.
7) There will be less than 3 candidates who formally register for the federal NDP leadership - 80%
Result: WRONG. This one was somewhat snarky on my part, and I let it mess with my judgement.
8) The expected 2017-18 deficit announced in the 2017 federal budget will be higher than predicted in the 2016 budget($29.0 billion) - 70%
Result: WRONG. It was actually $28.5 billion, so close, but wrong.
9) The expected 2017-18 deficit announced in the 2017 Ontario budget will be higher than predicted in the 2016 budget(balanced) - 70%
Result: WRONG. It seems they might actually run a deficit, but they didn't predict one, so this fails.
10) Approval of the performance of Justin Trudeau will be below 50% in at least one major scientific poll - 80%
Result: RIGHT. It was a squeaker, though.

11) The UK will invoke Article 50 and begin the formal Brexit process - 95%
Result: RIGHT.
12) Theresa May will remain PM of the UK - 99%
Result: RIGHT. That said, this one is case in point for why 99% is the highest certainty allowed in this scheme. This came shockingly close to failing.
13) There will be no second referendum on Brexit, actual or planned - 99%
Result: RIGHT.
14) The UK will initiate public talks with at least five non-EU nations for free trade deals - 80%
Result: I can't find any convenient list of deals underway. There's definitely talks with the US, and seemingly at least some PM-level discussions with Japan, but I can't find an easy way to judge this as either true or false. Which means it's probably false, to be fair.
15) No public process for a CANZUK free trade/free movement agreement will have begun - 80%
Result: RIGHT. A bit fuzzy on my phrasing, but governments haven't made any serious steps that I can see.
16) No deal will be reached between the UK and the EU on the terms of Brexit - 95%
Result: WRONG. They reached a deal in December.
17) No other nation will decide to leave the EU or Eurozone - 80%
Result: RIGHT.
18) Marine Le Pen will make it to the French Presidential runoff election - 60%
Result: RIGHT.
19) Marine Le Pen will not win the Presidency of France - 95%
Result: RIGHT. No surprises here - 30% of the population likes the alt-right and 70% hates them in most countries, and they were always going to unify behind whoever the sane one was.
20) Angela Merkel will be re-elected Chancellor of Germany - 70%
Result: RIGHT. Pretty close, which was expected(hence my comparatively low confidence here), but she made it.
21) There will be at least one explicitly Islamic terrorist attack killing 50+ people in the OECD - 70%
Result: WRONG. There were several nasty attacks, but the highest number killed by any was 39. This is one where I'm glad to be wrong, of course, but wrong I am.
22) There will be no terrorist attack killing 500+ people in the OECD - 90%
Result: RIGHT.
23) ISIS will remain a de facto nation with control of at least some territory - 80%
Result: RIGHT. Not a lot, but there's a few areas in Syria that they still hold(the grey parts on this map).
24) The US will continue to attack ISIS(at least until all their territory is lost) - 90%
Result: RIGHT.
25) The US will not begin any substantial new conflicts(Libya 2011 or larger) - 80%
Result: RIGHT.
26) Approval of the performance of Donald Trump will be above 50% in at least one major scientific poll in the last three months of the year - 80%
Result: WRONG. Again, I let my cynicism get the better of me. The highest I can find is 46%.
27) The US Senate will eliminate the filibuster for at least some votes - 70%
Result: RIGHT. The Gorsuch vote went nuclear.
28) The US will withdraw some form of support from the anti-Russian nations of Eastern Europe - 80%
Result: WRONG. Trump has been better than I thought he would be here.
29) No nuclear weapons will be used against civilian targets - 95%
Result: RIGHT. Thankfully so.
30) At least one world leader will be elected on a populist campaign routinely mentioned alongside Trump and Brexit - 80%
Result: WRONG. I can't think of any examples, at least.

31) Using the same methodology as my discussion of 2015-16 celebrity deaths, at least 10 celebrities will die - 90%
Result: RIGHT. 15 people, average age 62, which actually makes it slightly worse than 2016. (The list is David Cassidy(67), Tom Petty,(66), Malcolm Young(64), Roy Halladay(40), John Heard(71), Chester Bennington(41), Chris Cornell(52), Stephen Furst(53), John Hurt(77), George Romero(77), Gregg Allman(69), Bill Paxton(61), Richard Hatch(71), Jimmy Snuka(73), and Gord Downie(53)).
32) Canada will not have a natural disaster as devastating as the 2016 Aberta wildfires - 80%
Result: RIGHT.
33) No major green energy breakthrough(>50% improvement in output per dollar) - 90%
Result: RIGHT.
34) Global average temperature is higher than 2016 - 80%
Result: WRONG. 0.1 degrees cooler. That said, looking at recent history, I'd say this was pretty well-calibrated.
35) No natural disaster will kill 10,000 or more people - 80%
Result: RIGHT. The deadliest was the South Asian flooding, that killed about 1,200.
36) No natural disaster will kill 100 or more people in the OECD - 90%
Result: WRONG. There was an earthquake in Mexico City that killed 225.
37) There will be at least one computer security breach affecting 50 million or more accounts - 80%
Result: RIGHT. The Equifax breach was 143 million accounts.
38) No film released in 2017 will have a global box-office gross over $1.5B - 50%
Result: RIGHT. The highest was Star Wars: The Last Jedi, at $1.32 billion. (It's still in theatres, but it made $3M last week, so I don't think I need to worry).
39) The MSCI All-Cap World Index index will increase faster than inflation in USD - 60%
Result: RIGHT. Substantially faster, actually - it grew 23.16%.
40) 2017 will be the most prosperous year in human history - 95%
Result: RIGHT. Global real GDP per capita grew 2.5% last year, as it has grown every year since 2009.

41) I will be married - 95%
Result: RIGHT. :D
42) Our wedding will be under budget - 70%
Result: RIGHT. Substantially so, which was really nice.
43) I will have a full-time job - 95%
Result: RIGHT. This was a riskier one at the time than I wanted to really admit to myself, because when I wrote the original list, I didn't. But I was confident of my ability to find one.
44) I will have a permanent full-time job - 80%
Result: RIGHT. And rightly so!
45) I will no longer be doing financial plans as a side job - 70%
Result: RIGHT. Not something you can do when you're employed by a bank.
46) I will still be posting Friday Night Videos - 95%
Result: WRONG. Sorry, folks.
47) I will be making regular blog posts - 70%
Result: WRONG. Clearly, I fell off that wagon.
48) I will have a new desktop computer - 80%
Result: RIGHT. Got it back in August, and it's wonderful.
49) I will have my CFP and CFA - 80%
Result: WRONG. I have the necessary experience, but I've been procrastinating on my paperwork for it.
50) I will complete the design of at least one game - 60%
Result: WRONG. Too distracted by other stuff. But I still have a bunch in the works.

So, to summarize:
50% Confidence: 
1 right (#38), 1 wrong(#1) = 1/2 = 50%. Perfectly calibrated.
60% Confidence: 
2 right(#18 and 39), 2 wrong(#3 and 50) = 2/4 = 50%. Perfect calibration is 2.4 correct, so this is the best result that can be managed with this few guesses.
70% Confidence: 
4 right(#20, 27, 42, and 45), 5 wrong (#5, 8, 9, 21, and 47) = 4/9 = 44%. Overconfident, best result would be 6/9 correct.
80% Confidence: 
12 right(#2, 10, 15, 17, 23, 25, 28, 32, 35, 37, 44, and 48), and 5 wrong (#7, 26, 30, 34, and 49) = 12/17 = 71%. Best result would be 14 correct. (If we treat #14 as wrong instead of null, this is 12/18 = 67%, best result still 14 correct).
90% Confidence: 
#4 right, #6 right, #22 right, #24 right, #31 right, #33 right, #36 wrong,
6 right (#4, 6, 22, 24, 31, and 33), and 1 wrong(#36) = 6/7 = 86%. Still best possible result.
95% Confidence: 
#11 right, #16 wrong, #19 right, #29 right, #40 right, #41 right, #43 right, #46 wrong,
6 right(#11, 19, 29, 40, 41, and 43), 2 wrong (#16 and 46) = 6/8 = 75%. Overconfident, best result would be 8/8.
99% Confidence: 
2 right(#12 and 13), no wrong = 100%. Best result.

Overall, I'm somewhat overconfident, and predicted an average of 39 correct answers, when I only got 33 right. The 70% and 95% brackets in particular were bad for me. I suspect this is still better than most people would manage, but I think I can do better - a few of my mistakes seem obvious in retrospect. Also, I may want to change up what I guess on in order to spread things out a bit - there weren't many data points at either end, and that makes it tougher to know if I did well by luck or skill.

Friday, November 3, 2017

Friday Night Video: Grande Amore

I can't sleep on planes. Or at least, I seem to be unable to - the first time I ever took a flight that might justify sleeping, I decided to leave at 10 PM for a trans-Atlantic flight in hopes of making sure I could sleep. No dice. (Wandering one of the great cities of the world for the first time when you've been awake for close to 30 hours is not the way I'd want to do things if I was going to do it all over again, I must say)

Thing about planes is that you're sort of limited in entertainment. The in-flight movies are often not great, your phone has limited battery, and I think I finished one book and got bored of the other. So I started listening to the music selections. And boy, was it ever a mixed bag. But in the process, I did discover one band that's rather interesting - not quite my normal style, but it hit the spot somehow. Good thing about foreign carriers, they're a good way to discover foreign-language music.

Friday, October 27, 2017

Friday Night Video: Mr. Crowley

Halloween is a weird little holiday. Kids dress up as an excuse to get candy, university students dress up as an excuse to get drunk, and adults dress up their houses as an excuse to show off. For all that it's ostensibly spooky, it's really quite a silly endeavour in many ways.

Still, the silliest ones are probably the ones who take the spooky a bit too seriously. Occult stuff is an amusing thematic element at the end of October, but the rest of the year it's really easy to jump over the line from thematic and atmospheric straight into sad and cheesy. One of the musicians below seems to mostly dress up in occulty stuff for shock value(and biting the head off a bat on-stage was just an unfortunate accident), while the other seems to take it very seriously, but both seem to like referencing occultists, and both make decent music(at varying levels of weird) while doing so.

(And I know that in past, I've tried to make catch-up Friday Night Videos be multiple songs with the same title. Let's just say that, while I may not be into the occult, there's forms of weirdness I do enjoy, like making in-jokes for my own amusement.)

Friday, October 20, 2017

Friday Night Video: Fully Completely

It's depressing how many of my videos are posted because some musician I'm fond of died. Some are shocking, some are sadly unsurprising, but they're all depressing.

Unlike most, we knew this one was coming. Cancer is a bitch like that. But despite that, it's sad to know that one of our nation's greatest musicians isn't with us any more. Gord Downie, you will be missed.

(That said, do you know how confusing it is when the person breaking the news to you calls him Robert Downey by mistake?)

Friday, September 22, 2017

Friday Night Video: Link

Back in the olden days, when we used to get our music delivered by brontosaurus, I heard this wacky little song about Zelda games and thought it was pretty catchy. The weird part was that it was attributed to System of a Down, of all people. I can sort of see why, but hearing that this insanely heavy band(at least by the standards of what I'd ever heard back then) was doing wacky gaming songs kind of blew my mind. There's no way that nerdy stuff like gaming would be so popular as to make it to music by popular bands, is there. (Again, how little I knew...)

Sadly, this is not a System of a Down song. It's by this group of nobodies, which got passed around on false under a false name...and yet, probably drove 100x as much traffic to The Rabbit Joint as anything else they ever did, when people went to SoaD sites to figure out where it was from and got corrected. The old saying about how "there's no such thing as bad publicity" apparently even applies sometimes when you're not the one getting the publicity.

But hey, it's a cute little track, and someone on Youtube made a cute little video to go along with it. Why not have some fun?

Friday, September 15, 2017

Friday Night Video: And We Run

I have a soft spot for weird genre-bending music - it's not necessarily better than a well-done song of a more traditional sort, but it's usually way more interesting.

This one...yeah, it's a bit different. A lot of genres have picked up rap influences since the 90s, but this is an approach I don't recall seeing before. I must say, it works pretty well though.