Starting with Python (or really any object oriented languge)

So let’s say you are starting to program in Python, and you want to know how to start. What do you need to do?

Virtual Environment

Well, the first thing you need to do is install a virtual environment. There are two ways to do this:

  1. Install Anaconda. This provides you with a virtual environment with one command, along with several other features.
  2. Setup a virtual environment

If you are brand new to Python, please use Anaconda. It has everything you need. You download the installer from their website and run it. Restart your terminal, you’re good to go.

Let’s say for whatever reason you don’t want to use Anaconda. You still need to run a virtual environment. To do this on Linux, run the following commands:

  1. Install virtual environment for your distribution. For Ubuntu (or really any Debian based Linux) the command issudo apt-get install virtualenv. If you’re not using a Debian based distro, look it up online if you don’t know the name of your package manager.
  2. In your home directory, create a virtual environment using the command virtualenv linuxtest (name it whatever you want)
  3. Set the virtual environment to activate when you start your terminal paste echo 'source ~/linuxtest/bin/activate' >>~/.bashrc in your command line.
  4. Type source ~/.bashrc in order to activate your changes.

That’s it! Restart your terminal. You will see (linuxtest) before your username in your terminal, assuming you don’t have a custom terminal display. This means it worked.

If not, you either have customized your kernel at some point, or it didn’t work. If you type which python you should see /home/YOUR_USERNAME/linuxtest/bin/python. If you don’t see that, type sudo rm -r ~/linuxtest and try again.

But what’s the point?

Linux uses Python as part of how the Operating system is built. Because of this, the package manager modifies your root python installation. It will download, remove, and update any package it needs to do in order to keep your linux working. If you start upgrading, downgrading, or installing new packages, the best thing that could happen to you is that a package you use will be modified. The worst thing that could happen is you might fundamentally change a package which your operating system needs, and you could break Linux!

Don’t let this happen to you. If you wouldn’t download and run random executable files with names like va5e%smr2-09sd.exe from random websites with terrible graphics, you should use a virtual environment. Don’t screw up your operating system.

If you would run va5e%smr2-09sd.exe, then please stop doing that.

Pip

Python has its own package manager called pip. This is how every python package is packaged and distributed. In your terminal window, if you want to install any package, lets use Pandas as an example, just type pip install pandas into your command line.

That’s it.

If you aren’t using a virtual environment, start using a virtual environment.

If you are using python as root. Stop using python as root.

Update all packages

Now that you have used pip, what if you want to ensure all of your packages in you virtual environment are up to date? Well, for that I have a special alias on all of my machines which is alias pipupgrade='pip list --outdated --format=freeze | grep -v '\''^\-e'\'' | cut -d = -f 1 | xargs -n1 pip install -U. Paste this into your command line. Any time you want to ensure your packages are up to date all you need to do is type pipupgrade into your command line and you are all set.

Which version of Python should I use?

You should use the latest version of python in your virtual environment. You can get away with the version prior to the latest release. So right now that is python 3.10. If you’re using Python 3.9, no problem. You can even get away with Python 3.7 right now, because Python has had a 5 year support cycle for the last decade. Please check wikipedia to make sure the version of python you have installed is currently supported. That way you get the latest features, security updates, and practically all libraries will work on your machine.

Because you are using a virtual environment it doesn’t matter which Python version your operating system is using, you can use any version of Python supported by your operating system in your virtual environment, and that’s the interpreter you will be using when you run things from the terminal.

If your operating system can’t support a version of Python which still gets security updates, its time to update your operating system. For now, just use Ubuntu and upgrade to the latest LTS every October of an even numbered year.

You could even setup multiple environments if you want to test against different versions of Python. That’s up to you.

Pep 8. Who cares?

Python is a very opinionated language. It also uses spacing as part of how the programming language runs code. Because of this, its very important to make sure your code is written properly. Pep 8 is built into modern linters to make sure that your code will be legible, work the same way everywhere, and be consistent. Use it.

Once you have your virtual environment setup, Pip is working, your code is Pep 8 compliant, and you have a version of python which is currently supported running on your computer, write whatever you want. It will work on other modern Python environments, and you don’t have anything to worry about.

Don’t hide errors, fail fast, fail when necessary

If you are writing python code and you find something fails, don’t just hide it in a blank try except clause like the following:
try:
print('hello world')
except:
pass

This practice provides no useful debug information to your user. While print(‘hello world’) is an incredibly simple program, with more complex programs this can become a very real problem. This wastes the time of your users, it creates unstable projects, and it’s just disrespectful. If you user puts in an input which your package can’t read, fail the program, tell them what the problem is, and make it so they can fix the problem quickly.

There are times where a try: except: clause is useful. In that case, specify which types of errors are appropriate to pass on. Ideally write your code so instead of simply failing it gives useful feedback to your program which will be more stable.

Read good code

Writing code is the best way to learn how to write any language. But reading code is an important part of learning how to write a language so its legible. Go through some of the packages you download and try to understand why the library is written the way it does. Compare the structure of your code to the structure of frequently used libraries which are the heart of the language. If you understand how they are written, your own code will improve.

Hierarchy of loops

Python is not C. Python offers several major types of loops which allow you to loop through code. When I write code I write them in the following preference:

  1. result = [x**2 for x in original_list] Python has list comprehensions. The advantage to list comprehensions is that it is done in place, and it automatically saves to a variable in one line. If you were to do this as a for loop it would take a minimum of  three lines, where each line is very short. Once you are used to list comprehensions, you will prefer them. They are everywhere in good code. Get used to them.
  2. for x in y: print(‘x’) If you can make it work in a for loop. Use a for loop. If you can write in a single line in under 120 characters, use a list comprehension. For loops have a build in stopping point, they will not go on forever. This means your code won’t look like its working when in fact it has crashed.
  3. if x % 2: print(‘even’) else: print(‘odd’) If you need to do one thing under one condition, and another thing under another condition, use an if else loop.
  4. try: x except ValueError as error: raise error If you absolutely must use a try loop, make sure it prints the exception, except if there is a very good reason not to. If you can do it as a for loop, use a for loop.
  5. while x: print(time.now()) You probably don’t want to do this. You must be careful and build in a break statement. You probably just want to use a for loop. The advantage to a for loop is that if you miss the break condition the while loop will go on forever, with no error code. The for loop has a built in stopping point when the end of the list is reached. Only use this if every other option cannot be used.

This is my preference based on experience.

Write your own Pip package

You’ve been writing Python for a while now, you are comfortable with the language, and are writing complicated scripts. You might even have written something other people might want to use. Now is the time to do the next step in improving your Python journey, and improve your skills further. The best way to really solidify your python skills and solidify your understanding of the language is to write your own package for Pip. Follow the instructions at packaging.python.org step by step and install the wheel which is created at the end of your tutorial in a virtual environment. If it loads without errors, that means you can write code which is easy to read, and will run the same place everywhere.

There are many benefits to packaging your project and loading them as a library. Pip will tell you when major errors occur immediately. Pip will automagically make sure all dependencies are installed and give clear errors if they cannot be solved. It’s the easiest way to move your projects between different computers.

It helps you write better code.

Once you have mastered the basics, learn how to make a pip package.

How to win the midterms

There are several ways to win elections in American politics, and successful strategies are opposite depending if you are in power or out of power. Other impacts outside the control of politicians (such as media bias) can impact election outcomes, but ultimately politicians will collectively determine their fate.

When you are in power, you want to do the following:

  • Improve quality of life.
  • If the quality of life has improved, make sure the ads tell people that their life has improved.
  • Don’t ask. Tell. Asking gives people the opportunity to say no and question whether what you are saying is true. Only ask if you are absolutely confident what the answer will be, like Reagan’s campaign against inflation in 1984.
  • Pass policies which help as many people as possible. Improve the standard of living for the voters you need in order to keep power. This is the most important one of them all. Do everything you can.

When you are out of power, you want to do the following:

  • Make it very clear how you are different from the incumbent. Especially if there are serious problems impacting people’s lives.
  • Point to successes the last time your party was in power.
  • Point out inherent inequities, and problems which average people feel. Doesn’t matter if the incumbent has anything to do with it. If the incumbent did harm the country, even better for you.

None of this is really that complicated.

The Republicans are already doing everything they can from the third list. They are pointing out every problem with the economy, and they will keep talking about it incessantly until they get back power. Democrats should learn from this. Republicans are able to win on a platform where almost every policy is significantly unpopular because they are relentless in their pursuit of power.

But this is not relevant right now for Democrats.

There are several major midterms relevant for the 2022 election to look at historical results. We need to look at elections similar to the first midterm of a president who flipped the Presidency to their party. Elections which count are 2018, 2010, 2002, 1994, 1982, 1970, 1962, 1954, and 1934. There are several variables at play which make an impact:

  • Are the majority of Americans still angry at the other party for some reason?
  • Has the quality of life significantly improved since the Presidency flipped?
  • Has the incumbent President passed a major bill since being elected?
  • Is the messaging from the party on point? Is there something for the canvassers to talk about which people already know about?
  • Which parties are actively campaigning in as many places as possible?

Really it comes down to this. If all your canvassers have to do is point to a successful policy which everyone knows about and is popular, and claim credit, you will probably do well. If anger towards the other party is still high from the last time they screwed everything up, your job is also easier. These are the ideal ways.

A policy which will start improving lives in the future will not impact peoples votes in the next election. Politicians need to win elections in order to enact policy.

Not financing canvassers is surrender.

Let’s analyze historic elections with these factors:

  • 2018:
    • anger is directed towards Republicans.
    • quality of life is the same as when Obama was in power.
    • No major legislation, though one highly publicized failure with the ACA still being law. The ACA is popular now because its in effect.
    • Not much for Republican canvassers to talk about. Lots of outrageous comments from Trump which make people angry.
    • Democrats have new leadership. The 50 state strategy is mostly back.
    • Democrats win
  • 2010:
    • Republicans are busy pointing out how Obamacare is the end of capitalism.
    • Quality of life is improving, gradually. Unemployment is declining from its early 2009 peak.
    • ACA has passed, but most sections won’t come into effect until 2014. You can’t campaign on maybes and possibilities.
    • Aside from banking regulation, all Democratic policies will be implemented in the future. People haven’t felt the impact of Obama’s policies yet.
    • Democrats have new leadership. The 50 state strategy is out, Tim Kaine is highly focused on a handful of states.
    • Republicans win.
  • 2002:
    • Republicans are busy portraying America as safe from terrorist attacks with bipartisan legislation which passed.
    • Economy has recovered from the dot com bubble.
    • Republicans focus on safety and security in the new surveillance state.
    • Democrats voted for all of Bush’s policies. They have nothing to show how they are significantly different.
    • Republican leadership campaigns in as many places as possible.
    • Republicans win.
  • 1994:
    • Democrats to date have never clearly pointed out that the highest unemployment rate from 1960-2019 was in Reagan’s Presidency. Most people won’t know if you don’t tell them.
    • Economy is strong.
    • Clinton has some major accomplishments, like gun reform, and the assault weapons ban. Republicans are furious. The bill he put the most time into was Hillarycare, which unfortunately failed.
    • Republicans focus on macroeconomic goals, which most people do not understand, and put all of their effort towards false claims about how their macroeconomic goals will save the economy.
    • Republicans win

I could go on with previous elections, but the point is clear. Politicians have a responsibility to significantly impact the narrative. If you say you will do something big in the campaign, and then you can, but you don’t, voters will remember in the midterms. That’s an important piece of what happened in 1994. Clinton had an opportunity to control the narrative, but by failing to pass his health care initiative, he had lost his major policy initiative. He did other good things during those two years, including gun control, which has saved lives, but people want good health care because it impacts our lives so regularly, it’s a promise people remember.

For the Biden administration there are lessons to be learned here. Whether or not anything else gets through congress this session, there are still things Biden can do to impact peoples lives before the midterms. The infrastructure bill will not start having an impact on peoples lives probably until the Biden administration is in the history books. It will not help much with the midterms. Biden needs policies which will impact voters in the next 11 months. He needs those policies to hit demographics where turnout is not guaranteed, and help them enough that when he says “Go deliver me another trifecta” (telling, not asking) that voters will realize that they should follow his strong recommendation. They need to be personally invested in the outcome of the 2022 election and understand how it impacts their lives.

There are two policies Biden can do right now which will both fulfill campaign promises Joe Biden made, increase turnout and enthusiasm among key stakeholders in the administration, and also improve our economy. Those two policies are:

  • Forgive all student loans up to $50,000
  • Pardon all federal marijuana offenses.

The last time we saw such bold policies which impacted voters at such extreme levels before the upcoming midterms was before the 1966 election. That allowed more social and economic legislation to be passed which helped millions of Americans.

That is the easy way for Democrats to win the midterms so Biden can be the first democrat to have a trifecta for his entire first term since Jimmy Carter.

How to build Justice

Today’s verdict of Kyle Rittenhouse is a disaster, but not wholly unexpected. There have been many times in history where people have gotten away with murder before, and the reality is that this has been going on for hundreds of years. It is not new, it will happen again.

But we should not be complicit or complacent. This enters in one of the most fundamental questions in political science, which is how does one determine guilt? Every system has its flaws, every system will ultimately depend on people. If you use technology, someone needed to design and implement those algorithms. They had to determine what information that algorithm is fed, and ultimately, this is a human decision, no matter how much technology we might use to determine truth. Technology can certainly help in forensics, but people choose whether to use it, and what data to build it off of.

Every country in the world has a court system. Every community of people in the world will determine a method of enforcing rules and norms, and how to enforce those rules and norms, whether it be the government of China, or a commune of 10-20 people. The scale may be different, the fundamental principles of political science, sociology, and psychology however will stay the same.

Every legal system in the world will have three sides, one part determines what rules are going to be established, one will enforce the law, and the third will determine how the system is enforced. In the United States we call these the Congress who makes the rules, the President who enforces the rules through all of the Federal agencies, and the court system enforces the rules. In some countries the executive branch is elected by the people (aka a Presidential system), in some they are directly appointed by the legislative system (aka a Parliamentary system). Both of these systems have advantages and disadvantages. Neither is inherently better than the other.

Courts have two main extreme forms, with any form of authority, be it a commune, or the United States government. One extreme is where an appointed or elected judge determines the fate of the accused, besides those judges, no one else has any say. The other extreme is where the decision is fully come to by a jury of average citizens, and the jury changes for every trial. The United States has a system where the jury makes the final decision, but the judge enforces speaking time and the rules for the trial. The judge is supposed to have limited influence on the jury in our system, though of course the judge does have influence because of their decision on how often parties are allowed to speak.

So which is better? The argument for the jury system because it is still arguably better than a politically appointed judge making the final call. The best argument for a judge making the call (assuming the judge is properly elected) is that the entire population has a say on what type of judge you have determining your fate. Its impossible to know whether a politically appointed judge or elected judge would have come to a different decision.

What it ultimately comes down to is what are the values, educations, and norms of the population the system is serving.

In a world where everyone was compassionate, educated, and clear headed, either system would work fine. In a world where laws were enforced equitably and fairly, either system would work.

But the issue in society is that corruption is a constant temptation for those who have access to power. The temptation to take a public office and turn it into personal wealth is something which is hard to eliminate fully. Better angels in positions of power certainly make a difference, but when you are in a legislative body, you can quickly gain connections which can turn into very real job opportunities. While former members of congress get a salary for the rest of their lives, and it is a high salary, it pales in comparison to the money which can be made from the connections one makes from being in a position of power. If just being able to post a video on YouTube, or sharing a blog post which has ads, power attracts views, views generate cash. Unless if people were to suddenly stop listening to former officials, especially powerful former officials, which is absolutely never going to happen because of human nature, the potential for making money after serving in high public office is always going to exist.

Corruption however is converting public wealth into private wealth. It is the looting of the masses, to turn laws which serve the public into laws which harm the public as they benefit the final decision maker. Prominent examples include Gramm-Leach-Bliley, the Fugitive Slave Act, and many more.

But what we saw today with the decision regarding Kyle Rittenhouse was deeper. I don’t know what went through the minds of the jury to bring them to such an obviously wrong decision. The claim of self-defense is so obviously wrong. Someone doesn’t walk into a protest with a machine gun and shoot people who weren’t even attacking him in self-defense.

It’s very obvious when you look at the evidence that the protesters saw someone who did not agree with them running into the crowd, only looking to cause trouble. It is very obvious that Rittenhouse’s defense was lying all the way through.

He walked into a protest for police violence with a gun. He meant to cause harm. Protesters noticed his presence and acted in self-defense. If you are in a public event, and you see someone brandishing a gun, you have good reason to assume that they are up to no good. You have reason to defend yourself. Rittenhouse might have won the trial… but he knows that he was guilty.

It is even more clear that what really happened is that as people were protesting police brutality, Rittenhouse supported the murder which the police had done earlier, and it comes back to a reality that for hundreds of years in the United States people who defend Black Lives are not, and have never been, protected by the law.

It’s just a matter of time before more lone wolf Nazi terrorists go to protests regularly and shoot unarmed civilians again. This is likely to become normal, and the police will not protect the first amendment. The President refuses to criticize the decision of jurors all while giving progressives a hell of a time for standing up for his agenda. Voting rights are being lost, and there is a very high probability we will lose congress next year.

So what are our options?

  1. Violent revolution
  2. Vote in large numbers
  3. Protest in large numbers

Violent revolutions have a low success rate. Most violent revolutions end up with a system which is just as bad if not worse than the one which came before it. No democracy in the world was truly born from revolution, not even the United States. Building stable institutions takes time, so this is probably going to make the situation worse.

Vote in large numbers. Assuming that democracy is the least bad political system if you care about things like human rights, overall well being, and controlling equality, history tends to support that viewpoint, we are going to have a Democratic system. Democratic systems are only as good as the people you elect, and those people are only as good as the citizenry and how often those people vote. It’s time to take a deep long look at our political systems as political scientists do, and ensure that we have good people at the helm. It’s time to look at the research of social change from sociology where people have studied these very topics and have already identified solutions to the problems which plague us. When we elect leaders who say they will do something, we need to hold them accountable. We need to reform our election systems so we have more choice in the election, and make primaries meaningless. This process has already started.

Protesting in large numbers shows support for a cause. Generally they are calling for political change. Protesting + good government = change.

We need to change the systemic features of American society which uphold white supremacy these include:

  • The difference in wealth held by white and black families.
  • The difference in opportunities in majority white and majority black schools.
  • Gerrymandering which upholds racism
  • The Electoral College needs to be abolished
  • Police receive vast sums of money while social services are starved
  • Qualified Immunity allows police to get away with murder

And of course many more problems.

There are countless articles from countless organizations which go in detail on each of these points, and other points which I know I have missed. We need to ensure that our institutions support freedom and justice, and ensure that the people in those institutions are good people. No matter what society you are looking at, at any level, it always comes down to that. You need robust rules on how decisions are made which are strong, but ultimately we need to ensure that the stewards of our society who maintain our institutions are good people, out to do what is best for America. We have failed to do that as a country. That is why Rittenhouse is free. That is what needs to change.

References:

https://www.usatoday.com/story/news/nation/2020/08/28/kyle-rittenhouse-shooting-kenosha-what-we-know-victims/5654579002/

https://www.thedailybeast.com/aerial-fbi-video-shows-kyle-rittenhouse-wielding-assault-rifle-moments-before-fatally-shooting-two-people

Setting with Copy Warning

One of the most frustrating issues in Pandas is the SettingWithCopyWarning. To a beginner in Pandas this can be one of the most frustrating issues to deal with. What becomes even more frustrating is that the documentation is not very helpful, and StackOverflow offers a ton of answers which don’t help either.

The answer is actually quite simple. Pandas Dataframes are similar to dictionaries in how they have indexes, and every row has a specific name. This is useful because it helps ensure that every item will be placed in the proper row.

To make this work without triggering the error, you need to make sure that when you are retaining the row index in the object you are creating with your desired values.

Here are two common situations which you might find:

Rename a specific column

A Pandas noob will be inclined to write the following:


price_lb=prices[prices['Data Item'].str.contains('LB')]
price_lb['Value per pound'] = price_lb['Value']

Which will return the following error:

:2: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
price_lb[‘Value per pound’] = price_lb[‘Value’]

How do we solve this?!?!

Well, we need our good friend pd.concat to solve this problem unambiguously:


temp_df = pd.DataFrame(price_lb['Value'])
temp_df.columns = ['Value per pound']
price_lb=pd.concat([price_lb,temp_df], axis=1)

This is what you should do in order to ensure that there is no potential mismatching of data. We know this works because temp_df.index is identical to price_lb.index.

Run an operation on a column

A Pandas noob will be inclined to write the following:

price_ton['Value']=[x.replace(',','').replace(' (S)','').replace(" (NA)",'') for x in price_ton['Value']]

This presents a problem, because this generates a list, which has a index which is from 0 to the length of the list. This most likely doesn’t match the index of the DataFrame!

So we need to run an operation on this column, but also retain the index. Lambda functions are your friend in this situation. Rewrite your function like so:


values=price_ton['Value'].apply(lambda x: x.replace(',','').replace(' (S)','').replace(" (NA)",''))

Values will now retain the index and column name of the original Dataframe!

You can then use a pd.concat() function to bring this information back into your original dataframe.


price_ton=pd.concat([price_ton,pd.DataFrame(price_ton['Value'].apply(lambda x: x.replace(',','').replace(' (S)','').replace(" (NA)",'')))], axis=1)

No warnings, and every datapoint is exactly where it belongs.

I hope this helps you write better Python code.

How I protect my accounts

I have several layers of protection on my most important accounts. In short, I use the following secure features:

  • Each account has a unique random password which is generated and stored in my Lastpass Vault
  • Lastpass requires Email authentication to login to a new device
  • The email I use for Lastpass has two factor authentication with my personal phone

So in order to steal my data you would need to:

  1. Randomly guess the password for my email account. If you make too many wrong attempts, any half decent website will lock your account for a few minutes. This means repetitively entering in passwords will not work. If my password is 10 digits long, where any character can be one of 96 possible characters on a US English keyboards, you are looking 6.65e19 possible combinations (66.5 quintillion in American English). If the website allows 3 wrong passwords in a 5 minute period, it would take over 2.1e14 years to guess every possible password on that one website. It doesn’t just lock out from that one device, it blocks ALL attempts from all clients for those 5 minutes. Random guessing and checking is simply not going to work.
  2. Randomly guess the password for my Lastpass account. Same math. This is not going to work.
  3. In the highly unlikely event where you randomly guessed my Lastpass password, and also my email password, you also need to have my personal phone on your person in order to access my account.

Don’t even try. It’s not worth your time.

Apple vs Google, smartphone edition

I recently changed from Android to iOS, and I have a number of thoughts on what the different carriers do differently. Neither is inherently better than the other, and come with some massive tradeoffs. If one of these companies chose to learn from the other, there would be millions of people migrating from one platform to the other.

Android Advantages:

  • USB-C is vastly superior to Lightning
  • Has far more options in terms of phones, allowing them to control the lower spec market
  • You can easily fix your phone and it won’t break itself.

Apple advantages:

  • They support their operating system for a longer time than Google.
  • Their processor is the best on the market.

Right now I wanted to have a phone which would last a long time without the OS breaking, so I switched back to Apple after using Android for 8 years. I switched to Android because Apple was being overly controlling with their app store, and were limiting consumer choice.

What we really need is a phone which has the following:

  • Hardware support with their operating system akin to how Linux works. It needs to be mostly hardware agnostic, and never stop providing updates just because your device is old. It should always offer updates to the operating system, and be light weight enough so that it won’t break (though the same cannot be said about apps which are built on top of the operating system).
  • Use standard open USB connectors
  • Someone should be able to take apart their phone, fix a piece of it, put it back together, and assuming they didn’t make a mistake in reassembly, the phone should still work.
  • High spec processor

That’s what I want. Any company which does this will gain a lot of users.

Control inflation while reducing inequality

America’s GDP per capita is at a record high.

Inflation is climbing.

Immediately we know that the issue is a soaring demand curve, with a supply curve which is struggling to keep up.

So the answer to controlling inflation is pretty easy, either reduce demand (which would also harm GDP) or increase supply.

Unemployment is at 4.6% so there really aren’t very many people to bring into the labor market right now.

Our employment-population ratio is nearing 60% again, which has been the low end of the range since 1983. There really aren’t very many Americans who want to work who are not working.

We need more workers in order to keep up with rising demand (and those workers will themselves demand goods and services, because duh).

Inequality has stayed in the 40-43 range since 1993. Many Americans (myself included) are concerned with continuously high inequality.

So what we really want to do is raise wages for low income and middle class households, increase the labor supply. there are two ways to do this, we can either subsidize child care and pay for it by raising taxes on the rich, which is two birds with one stone because it reduces inequality while also increasing the labor supply.

The other option is to increase the number of available work visas.

You can only increase child care so much, but we should obviously do it.

These would help solve the labor crunch, but these policies will not solve inflation.

When we look however at where inflation is concentrated, it’s highly concentrated in the energy sector. The price of oil has skyrocketed over the last year, increasing from under $50 per barrel to $80 per barrel today.

The President of the United States, nay, the entire United States government has very little control over the price of oil. It is a global market, and the United States has less than 2% of the world’s proven oil reserves. We also have one of the highest drilling rates in the world as a percentage of oil we have. We are a small fish in the oil market, and we are depleting our proven reserves at a faster rate than any other country.

1/3 of global oil production is in Russia and Saudi Arabia alone.

Of the top ten countries by proven oil reserves, only one of them is a democracy, and that country is Canada. While Canada has vast oil reserves, it has a relatively small population and much of the oil is in Alberta. To put that climate in perspective, Edmonton has an average daily temperature below freezing from November through March, 5 months out of the year. This oil is located under land which is frozen for several months out of the year. I’m sure this is part of the reason why Canada has the second lowest extraction rate out of the world’s 17 largest oil producers, second only to Venezuela which is an economic and political crisis.

Despite the United States having the third fastest extraction rate, we are still in a global market, and we still have no control over the oil price.

What makes this even more dire, is that we will run out of current proven reserves in the United States in less than 10 years unless if we find a significant amount of oil reserves hidden somewhere in the United States somewhere very soon.

If Canada were to increase its current oil extraction to the same rate as the United States it would last for 66 more years. Saudi Arabia and Venezuela are significant outliers in terms of their oil supply.

The harsh reality is that as long as the United States stays dependent on oil, our economy will be under the control of countries which are hostile to democracy. It’s just that simple.

We need to transition off of oil and continue to expand renewable energy as fast as we possibly can. That is the only way we can protect our economy from hostile foreign actors.

That is the only way we can protect our economy from inflation caused by hostile foreign actors.

References:

https://en.wikipedia.org/wiki/Oil_reserves

https://fred.stlouisfed.org

https://data.bls.gov/timeseries/LNS12300000

Why we should cancel student loan debt

The year is 1992, you just had a baby, and you live in Washington State. The cost of college at University of Washington is around $3000, and you talk to your financial advisor about how to plan to make it so your child has the best opportunity possible. You don’t live in poverty, so there is little financial assistance for people in your financial class. Your financial advisor says you need to invest in college, and given how college costs increase by only 4-6% per year on average, he recommends you invest in the stock market to pick up an average of 2% growth per year over the next 18 years. Plus this is tax deferred of course because it’s a 529 plan, so it’s a good plan all around.

Assuming college increases at an average of 5% per year, which was a reasonable estimate for the time, your financial advisor makes the same prediction anyone else with a knack for economics would predict, and that tuition at UW will be around $6600 when your kid hits college in 2011.

In order to invest so you have enough, he adds up the predicted cost and estimates that you will need to have around $20,000 saved up to cover tuition when your kid turns 18 in 2011, so you should talk to the grandparents of your child and work to save up $1000 per year for the first 6 years of your child’s life. This prediction will mean that you should be able to cover the cost of college, given a generous inflation rate and an average APR of 8%. This would have been good advice, and what many parents got in the early 1990s for their children’s college from financial advisors who are really good at their jobs.

In 2002 tuition at UW increased by 16%, but the difference between the prediction and your amount saved up was less than $1000 per year, which is manageable for your middle class family to pick up the tab, so you didn’t change your investment strategy much.

Then in 2008 the infamous Great Recession hit and the State had plummeting revenues. Your child was already in high school, and already planning for college. In response, tuition at University of Washington rose by 13.1. Tuition was now 127% of the prediction you made 16 years ago. In 2010 it rose by 13.1% again, making it 137% of your prediction, and then in 2011 it rose by a whopping 21%, making tuition 158% of the amount you budgeted for based on historical trends.

For the average middle class family to find an additional $500 to cover the cost of college is manageable.

But when you need to pick up an additional $5000 compared to what you planned for, and you were only given two years to prepare, most families don’t have any good options to cover the unexpected increase of tuition in the time allocated to them. The only options left are for their child to work a low income job after high school to save the difference, which delays the time at which they get a professional job which pays them over twice they can make with a high school diploma (on average), which will literally cost them for the rest of their lives, and also reduce the taxes they pay back to society, and reduce their potential retirement benefits which will impact them for the rest of their lives.

The only solution offered by the American government was for the student to take on personal loans which cannot be discharged in bankruptcy. Now if we do the math and the family did everything right and they went with the reasonable prediction when their kid was born we are looking at a difference of almost $19,000 between the amount they allocated for college and the real cost. Assuming they can’t take money out of retirement, the only option left without postponing college is to take out a large amount of student loans.

Dixiecrats are trying to portray this as a fail of “social responsibility” and “you should have worked harder, you lazy Socialist scum” but that’s not what is actually going on. For half a century part of the social contract of being American was pretty similar to other developed countries, and it included ensuring that young adults get a college education which significantly increases life time earnings, extends lifespans, increases taxes paid, and improves the health of those individuals over their lives, saving a ton of money in health care costs.

In 2008 the social contract was broken, and the United States put an unprecedented burden on the middle class, those who are too rich for Pell Grants, yet too poor to simply pull money out of their non-existent retirement funds. The children of these people are far less likely to own homes which for the last two centuries has been one of two ways American families have grown their wealth, the other of course being IRAs. Average American families were planning on the government being their for their children the way the government was there for them when they were young, and then the government just wasn’t.

College is a necessary part of society, and we need everyone who is able to do the work be able to go to college regardless of how much money their parent’s make. Education funding is important because young adults don’t have time to save up for college, and young adults are not in charge of their parent’s financial decisions. Also, in the past people were only able to cover the cost of college because the government was covering a large portion of the bill, as part of the now broken social contract. Because of this, it is the role of everyone in society to ensure that young people are able to improve their lives, and we all benefit when we have a more educated population.

I’m done with higher education, I have earned my degree. My personal student debt load is minimal. I am very lucky, I did work in college as well, and my personal college funding my family prepared for me has nothing to do with my personal work ethic or self-worth. I had no control over that.

We need to rebuild the social contract. College needs to in cost to the point where it is affordable again, and those who are still in high school need to know that they will have a chance.

We also need to do right for those of us who had the social contract broken when we were in high school, especially my peers who didn’t have the luck I had with grandparents who have a good financial advisor who made good decision with them before I was even born. We need college to be accessible to all high school students who are willing and able to do it.

We also need to fix the social contract for my peers who saw the social contract ripped in two in front of their faces when we were in high school. The easiest way to restore the social contract is to pardon student loans. It isn’t a choice between doing right for today’s high schoolers and doing right for college graduates of the last decade, we can do both. Best part of this is the total tax burden for tax payers to pardon student loans is a whopping $0.

For these reasons, we need to restore the social contract and rebuild the American dream.

Pardon student debt.

Reference:

http://depts.washington.edu/opbfiles/web/2016-17%20Tuition%20&%20Fee%20History.pdf

college cost prediction spreadsheet

What comes next

Two things matter right now,

  1. Do Manchin and Sinema support the bulk of BBB (hint, we know they don’t)
  2. Will voting rights be passed

This will determine the next decade. Plain and simple. We have three potential futures which will be determined by these two decisions:

  1. We get only half of BBB and no voting rights (probably our reality)
  2. We get the full BBB and voting rights
  3. We get the full BBB and no voting rights

If Manchin and Sinema allow voting rights to pass (which requires filibuster abolition) we will get the other half of BBB, the thought we will get filibuster abolition, voting rights, and only half of BBB is preposterous. It can be discarded.

Scenario 1

This is probably our reality. Democrats run on around 10% of what Biden promised. Voting discrimination passes in more states, particularly Missouri. Democrats have negligible accomplishments and many of their voters have been removed from voter rolls. Republicans easily win the midterms. Bidens obsession with bipartisanship makes him the least significant President since James Garfield, with no major accomplishments. Republicans win in 2024, eliminating what little progress we made.

Scenario 2

The harsh reality of voter suppression finally means the Biden administration has to face the reality that the filibuster could make him insignificant. He uses his influence to convince Manchin and Sinema to abolish the filibuster and they pass the John Lewis Voting Rights Act. They pass the rest of BBB and democrats run on it next year. With expanded voting rights and a base who isn’t discouraged, the democrats keep their trifecta.

Scenario 3

Democrats have the full BBB to run on. Many POC voters are discriminated against, so democrats underperform. Its really hard for predict who gets congress, but it will be close. Voter discrimination in Georgia, Arizona, and Missouri (which is probably coming) will probably cost the Democrats the Senate.

President Biden, please put more pressure on Manchin and Sinema, they are the only ones holding up your agenda.

Closest Presidential Elections in American History, Part 2-1

What would happen in historic presidential elections if the vote flipped by 1% in each State towards the candidate who lost that state?

In 2020 Georgia, Arizona, and Wisconsin had margins of under 1%. Biden would have lost 37 electoral college votes compared to our reality and won 269 electoral college votes, sending the election to Congress. The Senate had a Republican majority and the House had a Democratic majority, meaning that the 12th amendment comes into effect.

What would have happened then? Well, here is a picture of the partisan majority of each state’s house delegation:

As we can see, Republicans would control the delegations from 26 states, Democrats would control delegations from 22 states, and 2 states had an even number of Democrats and Republicans from each state. 26/50 > 0.5 so that is a majority, and Trump would have won the election.

When it comes to the Vice Presidency, the Senate would vote with each Senator having one vote.

There were 52 Republicans in the Senate and 48 members caucusing with the Democrats, which means that Mike Pence would have been elected Vice President.

 

We seriously need to abolish the electoral college and vote for the President via the popular vote using Instant Runoff Voting. We cannot afford a situation like this, especially considering the damage that can be done by such an archaic broken system.