Saturday, March 12, 2016

How to not elect Donald Trump

The 2016 Presidential Election has been a crazy one. I haven't followed many during my life, but I don't think it take a genius to recognize that no election has ever received as much attention from the people of the United States as this one. I think that this will result in some great things such as higher voter turnout and a better understanding of the electoral process. However, I think we are all more worried about the looming potential negative effect of this election: Donald Trump could be our next President.

Facebook has been full of posts about why Donald Trump (or Drumpf as we #makedonalddrumpfagain supporters like to call him) should not be elected president. I think it's great that so many are becoming so politically involved and that so many people are recognizing Drumpf for the person that he is. I think its great that we are attempting to educate the people around us as to the potential results of electing Drumpf. I believe that these posts will help people to oppose his election. However, I think that the time to "oppose Donald Trump" has passed and the time to "not elect Donald Trump" has come.

I am not a political scientist, but I do have at least a basic understanding of how the nomination/election process works. More importantly, I have some knowledge about the power of social media and its effectiveness in spreading ideas. If any of the readers is a political scientist or has a greater understanding of the effect of social media, please correct me as needed in the comments. That being said, I do have some basic ideas on how to move from the "oppose Donald Trump" phase to the "not elect Donald Trump" phase.

Support another candidate on social media
All of the anti-Trump posts floating around Facebook have undoubtedly helped many people oppose Trump, but there effectiveness is decreasing. I believe that at this point, most people who are in favor of Trump would still be in favor of Trump even if he did "stand out on 5th avenue and shoot someone".

In order to defeat Trump, we should not focus on removing his supporters, but rather adding to the supporters of other Republican candidates. I would like to see fewer anti-Trump posts and more pro-Rubio and pro-Cruz posts. Honestly, I think that even seeing some anti-Rubio and anti-Cruz posts would be helpful; right now they just need posts. Any media is good media and Trump is getting it all.

If you haven't picked out a candidate to support, go ahead and watch some Republican debates on YouTube, take this online quiz to see which candidates policies match your beliefs (and see detailed output about why), and check out Marco Rubio and Ted Cruz's official websites. If you are not supporting one of Trumps opponents, then you really aren't opposing him.

Vote in your state's Republican Primary
Over the last several elections, the voter turnout for general presidential election has been around 50-55%. This is sad as far as what it tells about the political involvement of our nations population, but it is also great news when it comes to our ability to change. This means that each vote counts for about twice as much as it would if everyone were voting. Primaries, however, tend to get around the ball park of 10% (varying from around 0.5% to 25% depending on the state and year) which means your vote in a primary is about 10 times as valuable as it would be if everyone voted. If 10% of Trump's voters vote in each state primary, and 100% of people who oppose Trump voted in each primary, then the majority would vote against Trump even if 90.9% of the state's population was in favor of Trump. Now of course we aren't going to see 100% turnout against Trump and we will likely see more than 10% voter turnout amongst those who favor Trump in many states, but you get the idea: if lots of us turnout, we have a good shot.

Many US citizens (myself included) have never voted in a primary election before. This would be a great election for a first time. At this point I'll have to call on more knowledgable people to correct me in the comments, but it is my understanding that for most or all states the registration to vote in the primaries is the same as the registration for the general election. So if you are registered to vote in your state, then you are registered to vote in your state's primary election as well. However, your eligibility to vote in the primary may depend on whether you declared affiliation with a party when you registered.

In general, there are three categories of primary elections:
  1. Open primary: anyone who is registered can vote
  2. Closed primary: only those who registered with the primary's party may vote
  3. Semi closed primary: you can vote if you are registered with the primary's party or registered as unaffiliated, but not if you registered as affiliated with another party.
There are some other types of primaries as well, but these three are the most common. You can lookup the type of the primaries in your state at On the same site, you can also lookup the 2016 primary schedule to know when your state's primaries will be occurring. Go ahead and register today, it will only take a few minutes. Then set an alarm in your phone to remind you to vote on your state's primary election day.

Now that you've registered and marked your calendar, who should you vote for? Well I won't make that call for you, but here are some thoughts. In general voters follow one of two strategies: vote for the person who you want to win, or vote for the person who you can stand and who is most likely to beat the people who you can't stand. On one hand, the second strategy maximizes your probability of affecting the outcome of the election so it is sometimes wise to group together even if you would rather that someone else won. However, I think that in the case of this election, you might do well to vote for whoever you want to win. Voting for anyone (other than Trump of course) is a vote against Trump because if he wins less than 50% of the votes (or is it 50% of the states?) in the primaries then the Republican Nomination Committee will do something called a brokered convention. Basically, in a brokered convention, the Committee can nominate whoever they want and the rumor is that they will not select Mr. Trump.

Share these thoughts on social media
You only have one vote, but you can affect many more. Use that same passion that we have all had while we were sharing anti-trump posts on Facebook and share some comments in favor of other candidates or in favor of primary voter participation in general.

If you found any information in the post helpful, please share this with your friends.

Wednesday, September 24, 2014

What does "exponentially" mean?

We've all heard (or said) things like "such and such will improve such and such exponentially" or "if you do that, it will be exponentially better" or another variation of referring to exponential increase. Its been my experience that in almost every instance the speaker is completely wrong. Most of the people who use it, just don't know any better. They just think that exponentially means "a lot". Them I can forgive; its not their fault they never learned about orders of growth. However, I have also heard multiple people who really should know better misuse this word, including my interviewer in a recent Google interview. Someone has to put a stop to this.

Categorizing Rates of Growth

In computer science, we categorize rates of growth using asymptotic notation or "Big O Notation." Usually we use this to measure the amount that the runtime or memory usage of a program increases as the input to the program gets larger and larger. I'll go through the basics idea of what Big O means and then dig more into the details later. Basically, for any program (or at least any program for which the runtime is predictable) you could come up with a function that would tell you how many seconds or milliseconds it will take for your program to run. A lot of times it is more useful to have a function that tells you the runtime based on an input size rather than just reporting a number of seconds for a specific input size. For example, lets say we have two programs that take a list of names and put them in alphabetical order. If we just said "Program A takes 166 milliseconds to put 10 names in order and Program B takes 125 milliseconds to put 10 names in order" we would think that program B is the faster one. However, what we didn't know was that program A actually takes t=n*logBase2(n)*2+100 milliseconds to run where n is the number of names to sort and program B actually takes t=1.1*n^2+15 milliseconds to run where n is the number of names. So when n=10, B is slightly faster than A, but as n increases, A becomes much faster. If n=100,000 then program A would take about 55 minutes and program B would take about 4.2 months. By the way, both of these programs are much slower than a typical program in real life.

So its clear that its more useful to describe how a runtime grows rather than to just spit out an example of a runtime, but we really don't need quite that much detail. In fact we don't really care about the difference between t=n^2 and t=2*n^2 because you might be running one of those program on a computer that is twice as fast anyway. We need to strip out the unnecessary details and just show the basic rate at which the function grows. That's where Big O comes in. The basic (very basic) idea of Big O is that you take out an constants that are being multiplied or added and just show what type of function it is. So instead of saying the program takes n*logBase2(n)*2+100 to run, we just say it takes O(n*log(n)) and instead of 1.1*n^2+15 we just say O(n^2)

A More Formal Definition of Big O

If you felt like the section above was a good enough description of Big O for you, or you don't really care that much about the math, go ahead and skip to the next section.

The formal definition of Big O is (as I remember if from college):

Given a function f(n) and g(n), f(n) is a member of the set O(g(n)) iff
There exists a positive number C and number n0 such that for all n > n0, |f(n)| ≤ |g(n)|*C.

In other words, after n becomes sufficiently large, f(n) is always less than g(n) times some positive constant.

Note that according to this definition, the function f(n) = n (a pretty slowly growing function) is a member of O(n), but it is also a member of O(n^n^n^n) (a very very fast rate of growth). In general, when people ask "What is the Big O of this program" what they really mean is "What is the smallest Big O set that contains this program's runtime."

Exponential Increase

So you can probably guess by now, that to say that something increases exponentially, means that it increases at a Big O exponential rate of growth or O(B^n) (for some B > 1). So for example, if the population of your bacteria colony with respect to time is f(t) = 2^t -100t + 10000, then it is a member of O(2^t) which means your bacteria population is increasing exponentially with respect to time. Do not confuse this with polynomial increase which is O(n^e) (for some e>1). Note the difference, in exponential growth, the n is in the exponent, in polynomial growth, the n is the base being raised to some exponent. Congratulations, you should now know how to use this word properly!

Common Mistakes

So, now that you know what it means for something to increase exponentially, I'll take you through the three categories of misuses of the word starting with the most forgivable and moving towards the blatant, blaring, butcheries that make my blood boil.

First, theres the mistakes like "As the outside temperature goes up, your electricity bill goes up exponentially." This is quite clearly wrong. I don't know what the exact function relating the outside temperature and your electricity bill, but its probably roughly linear with a cap at the top once you are running your air conditioner all day. This is not anywhere close to being exponential growth, but compared to the other mistakes people make, this one is actually refreshingly close to accurate.

A worse mistake is when people say something like "If you wear the proper biking gear, the distance you can bike will increase exponentially." What on earth does that even mean? It may be true that wearing the biking gear increases the distance you can bike dramatically, but wearing the right gear is a binary variable (meaning, you can wear it, or not wear it) so what exactly is the "n" in your O(B^n)? In order for something to increase exponentially, it needs to be something you could graph on a line graph with numeric values on the x axis.

And finally, some people add a little touch on the previous mistake to push me over the edge. They continue to use a binary input value, and then they use something unquantifiable as the output value. An example is "Kraft Macaroni and Cheese tastes exponentially better than the store brand." I'm just not even going to get started on that one.

So please, go spread the word. If every person who reads this teaches 2 people a year what "exponentially" means, and each of them tells 2 more people a year and so on and so forth, then the number of people who know how to use the word properly will increase at O(2^n) or in other words, exponentially.

Sunday, June 30, 2013

Real Pizza

On various occasions, I have been involved in conversations regarding the subject matter of which brand of pizza is the most delicious. The other people in the conversation will list off their favorite, some of them are great pizzas, some of them are just good, but none of them is the best. I am always reminded of the day my life was opened up to a new pizza which I never could have imagined before. Its a memory that brings a multitude of emotions: joy as I remember the taste, disappointment as I listen to the other people describing their inferior favorites and realize that they can in no way relate to my pizza experience, longing to eat that pizza again, and sadness when I think about how unlikely I am to eat it again in the near future. I know that they other members of the discussion will never be able to understand the glory and magnitude of my first Giordanos pizza experience, but I always share it with them anyway.

When I was about 13, my family lived in West Lafayette Indiana. Being a faithful Latter-day Saint family, we often would travel to the nearest LDS temple, located in Chicago Illinois. On one trip, my parents decided to follow the recommendation of a friend and try Chicago style deep dish pizza in an award winning pizzeria called Giordanos. It seemed like something that would be a little too expensive to feed a family as large as mine but the friend esteemed the restaurant so highly that we decided to check it out.

When we arrived, sat down, and looked at the menu, we were shocked at the prices. How could they charge so much for such small pizzas? We thought about leaving, but we wanted to try the pizza's so badly that we decided to just order 2 or 3 small pizzas to share among the ten of us. This would mean only two or three slices for each of us, and then we would go get some fast food to fill ourselves the rest of the way up. Turned out, those 2 slices per person filled us up so much that we could barely walk and we waddled out of there with at least 2 To-Go boxes. The pizza was like nothing I had ever experienced. Every bite was like a rush of joy from my tongue to my toes. Many pizza places claim to make deep dish pizza because they have a pizza that is a little bit deeper than their normal card-board crust. These pizzas though, were 3 inches tall and consisted of a crust much like a pie crust, but not so sweet, a layer of toppings on the bottom, a good inch of cheese, and topped with a pool of tomato sauce. You can't believe how good they are until you try them.

And so, for 10 years I have been haunted by the memory of the deep dish pizzas which from then on I ate every time I was in Chicago. Every time someone mentions how good a pizza is, I think of how much better it could be. Every time someone mentions their favorite food, I think of how I mine is only found on the other side of the country. Every time someone says how they like deep dish, I think of how sad it is that they don't even know what deep dish is.

We moved back to California when I was 14 and for a time I thought I might never have the perfect pizza again, but a little glimmer of hope ignited when I discovered that Giordanos pizzas can be ordered online from anywhere in the nation. From the day I made this discovery, I have been dreaming of one day when I could justify spending the amount of money it takes to send an already expensive pizza in the mail on dry ice all the way to the West Coast from Chicago.

And so that is the way my life went for the next decade: enjoying pizzas and other delicious foods, but always hoping that one day, I would taste a real pizza again. I never forgot that Giordanos was only a few clicks away on but I am not an extravagant person and I couldn't justify ordering a gourmet pizza from 1667.91 miles away. After all, I was still paying tuition, rent, and living off a college students wages. Two days ago, June 28, 2013, my opportunity finally came.

I just graduated with my Bachelors degree in Computer Science and I just received my first paycheck from Yahoo! inc. On top of that, June 28 is my birthday, so my lovely wife agreed that in order to celebrate not being poor (for the first time in our marriage) and my birthday, we could splurge and order some Giordanos pizza. We decided to get two because the price per pizza was much less than it would be if we ordered one. We got a sausage one (perhaps my favorite) and a spinach one (which I believe is the pizza that has won Giordanos the most awards).

When the time came finally end my 10 year Giordanos famine, I was nervous. I knew it would be good, but could it possibly live up to my expectations which have been augmenting daily for years as I've fantasized. There was a possibility that a heavenly pizza to my 14 year old self was just a good pizza to my 24 year old self. What if it was like the first time you try a Squeez-It since you were in kindergarten and you're bursting with anticipation only to realize that its just half a gulp of colored sugar water. So I tried my best to calm my nerves and realized that while no food could ever be as good as what I had built up in my head, the pizza would still taste great and I should just avoid it.

Then I took the first bite.

When I took that first bite, all I could do was smile. I chewed for a bit and said "Oh man, that's good" with a quiver in my voice. It was better than my "unrealistic" expectations. The juicy mozzarella covered sausage seemed to enlighten my mouth and fill my whole body with a jovial sense of wonder and amazement. I have had food make me happy before, but this was the first time in my whole life, that food actually made my laugh with joy. I even had a slight urge to cry. My wife said that she has never seen me make the face I made while I was eating that pizza. I was amazed and relieved to know that my expectations were realized and exceeded and that there really was a food that good out there.

Now I'm still enjoying the leftovers one or two slices at a time :)

Tuesday, March 5, 2013

Gun Control

I'm never going to pretend to be an expert on politics, and quite honestly, I'm not even going to read enough of the news to make this an educated post. If it turns out that I state something that is completely contrary to the actual facts, I don't even want to here about it. This is just a warning to society.

I've been hearing a lot of talk about President Obama and gun control. The common rumour going around is that if he had his way, no one except for the police and military would have weapons. I find it difficult to believe that a man as educated as himself could actually believe such a thing, but if it is true, we cannot allow the other uneducated members of the United States fall into the same idea.

I understand the need for gun registration and regulation. Knowing who owns what guns can help avoid and prosecute criminal activity, but getting rid of them altogether would be the most direct violation of the constitution since the day our country was founded. People complain that we should have the right to guns for recreation or self defense, but I think that the real reason that taking away our guns is such a bad idea is because we need guns to take over the government. When Thomas Jefferson wrote The Declaration of Independence he stated, "whenever any Form of Government becomes destructive of [the people's natural rights], it is the Right of the People to alter or to abolish it, and to institute new Government." It would be nice if we could always abolish these government without violence, but this often isn't the case, hence in the bill of rights we were given the right to bear arms.

So far, we have not had the need to overthrow our government because our leaders have mostly stuck to the Constitution. They may have bee a little flexible in their interpretation here and there, but they've never done anything that just completely disregarded it. If we were denied the right to bear arms, then for the first time ever, we would need our arms. It makes sense that Barack may want to limit our ability to take over his power; from a Machiavellian standpoint, keeping us at bay is the right thing to do. Quite frankly, taking away the weapons of the people is the best first step to establishing a military dictatorship. If the people of America care for their Nation, then this must not happen.

This brings up an interesting point; if President Obama were to attempt to outlaw guns, would it be ethical to assassinate him? I'm a little torn on this subject because it certainly would help protect our country from tyranny and I'm sure that any of our founding fathers would want the aspiring dictator out of power as soon as possible, however I think and hope that it would not be necessary. Personally, I would not assassinate him because I have confidence that our government has enough checks and balances in place that a law to ban guns would never pass. Perhaps little Barack missed the day in 3rd grade when they went over the bill of rights, but I doubt that the entire congress and supreme court were absent on the same day.

If, however, by some means the President manages to violate our right to arms, he should count himself lucky to just be impeached. I hope that the patriotic, yet rash, people do not need to completely overthrow the government or assassinate the President. If justice prevails though, the President would be impeached, and then executed because high treason is a capital offense.

Sunday, November 18, 2012

Coping with Disasters

Disasters bring out interesting aspects of the human species. When a person is placed in situation of peril, they portray some of their best and worst qualities, they show how they react under desperation and how strong their stamina is. In my life, I have lived through two major disasters: the first was in Chile in the earthquake of 2010, and the second, was just two days ago on the 16th of November when Hostess went out of business.

My usual Friday routine consists of going to a couple classes and spending the rest of the day slaving over homework. I was looking forward to this particular Friday because my classes were cancelled and I was going to get to spend the whole day just slaving over homework. Apart from that, it was just a normal Friday until my wife looked at the news on her iPhone and said "Hostess is going out of business right now!" A flood of emotions came over me; the first thing I thought of was shock, "how could such a great giant fall in such a short amount of time." My thoughts went to the Roman Empire and how it seemed so invincible in its prime, yet eventually went the way of all the world. Then my feelings turned to rage as I realized that this was most likely due to the health conscious people of America and their anti-sugar propaganda which has been plaguing our country. I dwelt on this thought of how preventable this disaster was until Drea informed me that Hostess had already shipped its last products and that what was on the shelves at stores was it. There was no time for more emotion; it was time to act.

In times of disaster, one of the more beautiful things that happens to people, is that they immediately look out for their friends and family. We sent out a text to inform our siblings and parents that they needed to raid the stores and then I called my sister Marsha, who did not have a car and could have been left stranded and twinkie-less if we didn't help her. It was clear that she understood the gravity of the situation when I called her and said, "Marsha, there's a big emergency... Hostess is going out of business." I was about to go on and explain that we would pick her up to buy some last Hostess products, but I was interrupted by her saying "I'll get my shoes." I just said "be there in five" and we picked her up.

Our first stop was the Maceys. The Maceys in Provo is probably the largest grocery store and was a likely place to find all of the products we need. Right next to it is Big Lots, so I dropped Drea and Marsha off there to do a quick sweep while I started running up and down every isle at Maceys. When we met up, Marsha and Drea were empty handed and all I was able to find was a bag of Wonder Bread (which we didn't really want anyway because we already had some and it doesn't last long).  We kept scouring the isles until we found it; a mostly empty end cap of Hostess products. Drea and I have been short on money lately and we were pretty selective about what we buy, but I just put my basket against the stand and started shoveling things in. You could tell that we weren't the first people there as most of it was missing already. We grabbed a box of twinkies, a lot of fruit pies, some zingers, small doughnuts, and a few other odds and ends. Deciding that we were done at Macy's, Marsha and Drea headed to checkout and I went to return the Wonder Bread. On my way back past the end cap, I saw an old man just looking down and shaking his head. "Its a sad day" I said. He just nodded.

We were thrilled to have found so many essentials to stock up for the future, but we were still missing what was arguably one of the most delicious things hostess had ever made; the Raspberry Zinger. Drea was wise enough to think of going to the Springville Walmart since the Orem Walmart is always picked over by college students. We hopped in the car, probably broke a few traffic laws, and speed down to Springville. On my way I couldn't get out of my head the thought that just the week before in Elder's Quorum we had a lesson on emergency preparedness. I thought I was so good at being ready. Drea and I made plans for how to contact each other and we decided to start storing water, but we never expected this. I just never thought it would happen to Hostess.

Disasters bring out the charity in people. We stopped at a stoplight and saw a homeless man begging for food and money. There was a part of me that thought "he would be just as happy with any type of food, why should we give him our Hostess stuff that we worked so hard for." But we all knew what we should do. We gave the man a Twinkie and told him to enjoy it since Hostess is going out of business.

As we were getting close to the end of Provo, Drea spotted an Albertsons and we decided to check it. Marsha was the first to make it into the door and the first thing she saw was a mother and a daughter heading to checkout with their arms full of boxes of Hostess brand treats. She pointed at them and yelled, "Where did you get that!" The mother pointed to the back of the store and said "Its at the end of that isle, but you'd better hurry, there's not much left." That's when I arrived and asked if they had any Raspberry Zingers. The mom replied despairingly "No!" We immediately turned around and ran out. I actually ran out of the store so fast that I didn't give the automatic doors enough time to open and I ran straight into them. We didn't even have time to laugh about it.

When we finally reached the Springville Walmart, we ran as fast as we could up and down the isles of the grocery section. I found an isle which was stocked full of Little Debbie products and had a mostly empty section right next to it with two frantic shoppers looking for what was left. As I arrived, I got down on my hands and knees and found at the very bottom shelf pushed all the way to the back, three boxes of Raspberry Zingers. I dove in and grabbed one of them, deciding to save the others for someone else.

After leaving Walmart, we had everything we needed except for Snowballs (which was a childhood favorite for Drea) and Ding Dongs (which I missed, but felt I could do without). We decided that we should probably get back and just try to go on with our normal everyday lives, but that we would be willing to try one more place on the way. We pulled into a gas station to give one last shot. We weren't very hopeful, so Drea and I just waited in the car while Marsha checked it out. After a few seconds, Marsha came out waving frantically. We ran in and found a whole shelf with some of the things we already had, plus Snowballs, Ding Dongs, and Hohos. It was a miracle.

The death of Hostess is something that will effect America forever. We wont be able to ration our small store for the rest of our lives (right now it seems hard to make it last more than a few weeks) but what we were able to gather is at least enough to let us give Hostess it's proper goodbye. Who knows what the future will hold. It may be that other companies buy many of Hostess' recipes, but what they will do with them is uncertain. Will our children ever know what its like to eat a sort of bad yellow cake with sort of bad cream stuffed in it? Well, our first child will at least, because we vow to save at least one Twinkie till its first birthday.

Friday, November 9, 2012

Election Pessimism

To the uneducated election follower, president Obama's victory in the recent presidential election came as a surprise. Romney was winning in both electoral votes and the popular vote up until close to the end after all. However, even someone who is uninterested in politics and doesn't have TV like me could tell that odds were by far in Obama's favour. I personally was rooting for Romney because I am sort of curious to see how he would do so I whipped out a spreadsheet and figured out what states he would have to win and kept track of which ones he already had. After Florida started looking pretty hopeless I called it over and posted my opinion on facebook.

To my surprise, I got a lot of reactions from other people like, "don't give up," and "its not over yet" as if people felt like I was pessimistic and thought that America had failed. I'll admit, it was still possible for Romney to miraculously win all of the other remaining states and win by a hair, but it was also possible for him to unveil a secret army and have a military coup, or for a giant meteor to hit the earth and kill us all, or any number of other election altering things to happen. The fact is though, that the probability of all of those events is really small. The question I have running through my head though, is this: which is more pessimistic, to think that Romney will not win the election, or to think that Obama winning means that America is doomed. I'm not going to get into the candidates policies and garbage in this blog and  frankly I'm not interested in anybodies opinions with regard to policies in my comments, but I just want to throw out there that there's nothing wrong with saying a candidate is going to win when you're pretty sure he's going to win.

Also, even if you're sure Obama will be horrible, its not like its the worst loss of the year. The worst loss was obviously the BYU vs Utah football game. It was a lot closer, and its outcome actually affects my life.

Monday, November 28, 2011

The Nerd Drug

Massively multiplayer online role-playing games or MMORPGs are destroying the lives of users all around the world. While they seem harmless (and even can be when handled with caution) they have caused gaming addictions that take over many gamers' lives. The typical gamer is a geeky guy who doesn't do well socially and often feels like the underdog in real life. When he is at his computer with his guild, he is on equal footing with everyone else 1. The virtual life becomes more attractive than reality so the gamer spends more and more time online developing his virtual self and becoming more and more addicted. Video game addictions (particularly addictions to MMORPGS) have led to divorces, college dropouts, lost jobs, and even suicides. It is unlikely that the government will be able to regulate video game addictions without violating our rights, so it is up to each individual to maintain a defense against this new drug.