Rough Book

random musings of just another computer nerd

Imbalance in coverage sentiment does not necessarily imply bias

This Harvard Study of negative coverage gets cited a lot as “proof” of the MSM’s bias against Trump. But this argument is a bad interpretation of the study, based on two, major logical-flaws. I wrote this a comment response to someone, but I think it deserves its own post. I think my reasoning is correct. Please let me know where I am wrong. The study being referenced is talked about in this article.

You keep referencing the Harvard Study. I didn’t want to go into this into too much detail because I’m tired of explaining this over and over again. Your reliance on this study is based on two, major logical flaws. I will explain how.
Your reference Harvard study shows that you do not understand what bias, or what it does or does not imply. Bias by itself has no bearing on credibility, and cannot be used as a singular feature to assess it. Case in point:

  • Outlet A that largely reports accurate, positive news about X, has high standards of journalism, and retracts articles when shown to be false
  • Outlet B that largely reports accurate, negative news about X, has high standards of journalism, and retracts articles when shown to be false
  • Outlet C that largely reports positive fake news about X, has little to no standards of journalism, wilfully engages in misinformation and does not retract anything.
  • Outlet D that largely reports negative fake news about X, has little to no standards of journalism, wilfully engages in misinformation and does not retract anything.
  • Outlet E that largely reports both negative and positive fake news about X, has little to no standards of journalism, wilfully engages in misinformation and does not retract anything.

Outlets A and B are biased but credible. Outlets C and D are biased and not credible. Outlet E is non-biased and not credible.
Therefore bias alone does not imply credibility; it may be bias but it can also be something else, which leads us to your second, major logical-flaw: you assume that reality must always reflect 50% positive and 50% negative coverage. This is a ridiculous assumption. A true distribution exists and it may not be a fair (in the mathematical sense) one. Case in point:

  • Person A engages in horrible conduct (any sort of horrible conduct you can think of).
  • Person B is just a regular human being who has made some mistakes, but is largely a good person.
  • Person C largely engages in negative conduct, but has also done some good things (e.g., a mafia don who gives free food to his neighborhood).

Now take each of those persons above, and substitute them for X in the example outlets are shown above. What do you see? The definitions of A, B, and C shows the true distribution of their behavior. The kinds of reporting from A, B, C, D, E can influence a person’s perception of their behavior. What does this mean? That you cannot solely consider those outlets in isolation, using bias, as a metric for credibility. You must consider outside, credible, corroborating sources.

Now in the case of Donald Trump, there is an extremely large amount of corroborating evidence, both from his actual, public, verifiable behavior, and from the comments of his close associates, which point to a general consensus that he is an odious man. He does multiple things on a daily basis that objectively display his lack of fitness for the Office of President; especially his inexperience, incompetence, ignorance, intemperance, lack of intelligence, lack of poise, and complete lack of principles and responsibility.

Comparing the reporting of MSM outlets with corroborating evidence of Trump’s words, behavior, and conduct leads us to the inevitable, logical conclusion that MSM coverage is a close reflection of the true distribution of Trump’s behavior, and one cannot use the mere fact that there is an imbalance in the sentiment of coverage to allege that there is a bias.

QED.

The Rand Paul Healthcare Bill

The house withdrew the AHCA today. After seven years of screaming about repealing the ACA, it looks like they can wait longer. I had made some criticisms of Ryan’s plan and so a friend asked me what I thought of Rand Paul’s healthcare bill. There are some good ideas in there, but also some bad ones, and some ones that I’m not so convinced would work out, even though they sound good. So here are my thoughts on it in no particular order.

I liked the Charity and Bad Debt deduction for physicians. Basically, physicians can deduct up to 10% of their gross income for amounts they would have otherwise charged for charitable care or for those with bad debt. I think this may help drive down some healthcare costs, while also helping out people who aren’t able to afford healthcare. But I think this whole issue of healthcare costs itself needs to be looked at more (for example, drug costs).

Paul’s plan is pretty bad for poor or unemployed people in general. It brings back the HIPAA protection for pre-existing conditions, but that is tied to the time you were employed. So if you haven’t been able to get a job for a while, you’re screwed. It also takes away the ACA’s essential health-benefits requirements, community rating restrictions, rating reviews, medical-loss ratio, and other mandates. I think these mandates are necessary because otherwise the system is setup so that it is more profitable for companies to deny coverage than provide it. Not only that, without the individual mandate, healthy or younger people don’t really have any incentive to sign up (not that the individual mandate was doing much in that regard). This means that the individual market is not that profitable for insurance companies, and most Americans get their insurance through employers anyway. So I don’t see how market forces will drive prices down, enough to where younger or healthy people don’t feel like it is such a burden to get insurance, or even to where it is affordable for poor people.

One of Paul’s other proposals is to open competition across state lines. I think that may help drives the prices down a bit, but since purchasing individual-coverage is still largely disincentivized, I still don’t see much change happening. This is also not going to happen immediately, so in the meantime, it will be more profitable for insurance companies to deny coverage to risky (in the sense of costs to the insurer) individuals. This will stress out an already expensive market, because these people will inevitably get sick enough to where they need care. They won’t be able to afford it, and will go bankrupt, causing someone to eat the costs, which forces prices to go up even more as they try to offset the difference. He also mentions expanding the Medicaid Waiver program, which lets states change their Medicaid plans without approval by the HHS. This can allow states to experiment with different coverage-rules, but my admittedly-cynical expectation is that they will change rules in an effort to save costs and not expand coverage, which I think will make the problem I mentioned earlier even worse.

He does propose a tax-related benefit; basically you are allowed to deduct your premiums from your taxable income. But I don’t know if that really would be an incentive. Note that you will end up saving more money if you didn’t get insurance and held onto what you would have paid in premiums, than you would by getting insurance, and then claiming the premium as a tax deduction. To encourage participation in the individual market, there’s stuff in there about Individual Health Pools and Association Health Pools, where a bunch of people can get together and pool their money. It sounds like a good idea in theory, but without more details I can’t say whether it would help or not.

There’s a bunch of stuff related to HSAs, but HSAs are only useful for people with steady income, and most definitely not for people making minimum-wage. He does also propose removing limits, but that won’t help someone making minimum wage either. There’s a funny bit where you can use your HSA to pay for insurance premiums I guess, but why not just pay for it directly if you’re going to be putting money into an HSA? I don’t think HSAs in general work; at least not for a healthcare market with the kinds of costs we see today. People don’t have the information to predict what kind of healthcare they would need. Not only that, people have no idea how much such care would even cost. So how does it really help if you’ve been putting away $200 a month for a year, only to get surgery in December that costs $6000? This is not outside the realm of possibility.

Overall, I think Rand Paul’s plan is worse than the ACA, because it will effectively start off by denying coverage to a bunch of people. Some of the ideas sound good in theory, but I am not convinced they will work out. Some of the ones that may work out, will take too long to do so, which means that a lot of people are going to be without coverage in the meantime; it seems unethical to write them off simply because the market needs time to “correct”. However, I think there are some good ideas in there that could be rolled into ACA — some of the tax-related ideas are good, although I would much prefer a refundable tax-credit for premiums compared to a deduction. The tax benefits for physicians that provide charitable care is also good, and I think it would be helpful to expand those to apply to all sorts of healthcare providers.

Final thoughts

I need to write this down just to sort it out. Everyone says it’s not a “big deal” and that “life will go on”. I don’t know. In elections prior, I have been disappointed but I never grieved. I thought America was headed, or at least heading (however haphazardly) in a direction where we didn’t care about each others’ race, sex, religion, or sexual orientation. I thought that we were poised and ready to tackle the problems of this new century. Then this election happened. Instead of policies, we were literally debating a candidate’s fitness for being President. Instead of merely deciding the direction of this country, we were deciding its character. I never thought that we would elect a man who categorically stated that he wanted to ban an entire religion from this country. I never thought that we would elect a man who is a bully. I thought that we valued experience, knowledge, and intelligence in this country. I never thought we would elect an inexperienced man, who, based on all we know, is not even a successful businessman. I thought we valued pragmatism, poise, and compromise, if not in Congress, at least in the President. I never thought we would elect an immature, thin-skinned man, who goes into an apoplectic fit just from a mean word.

Growing up, we’re taught things by our parents to help us become productive members of society. We are taught to say “Please”, “Sorry”, and “Thank you”. We are taught to respect each other. We are taught not to bully each other. We are taught not to discriminate against each other. We are taught not to take advantage of each other. We are taught not to lie. We are taught to work hard. We are taught to be good people. This election changed all of that. How can a man who disregards the social contract of a society ever be fit to lead that very society? I think those on the other side think I’m sad or disappointed because my party lost. No; it has nothing to do with being Republican or Democrat. But it has everything to do with deciding who we are as a country. Our principles. Our values. Hillary’s sins are well known. She is a flawed candidate. But I don’t think that she is fundamentally a bad person. Think about anyone you disagree with. Simply because you disagree with them, do you consider them a bad person? This is how I have felt about every candidate I didn’t support. I disagreed with Bush, but I never thought he was a bad person. I disagreed with McCain and Romney, but I never thought that they were bad people. They never did anything that ever made me feel that way. Think about Bush’s statement to Cindy Sheehan, his statement about Muslims after 9/11, or McCain’s response to a woman attacking Obama. They were respectful – that is how the people who want to be leaders of this country should behave. How do you explain something like this to a child? If you voted for a person who does everything you tell your child not to do, how do you explain yourself? A Trump supporter told me that one shouldn’t look to politicians for moral guidance. I’m not sure if they understood my original argument. This is not about having a source of morality; it is about an example. Think back to our earliest lessons in morality – fables – if you do bad things, you get in trouble. If you do good things, good things happen to you. Trump contradicts this most basic axiom. His character contradicts it, and now so does our national character apparently, in that a significant part of the country is not just fine with,but wanted a man like this to be president.

As a rebuttal I often get questions as to how I could support someone shady like Hillary. This usually comes with a gish gallop of numerous conspiracy-theory articles. But in general you can sum it up to the following: she lied about Bengazhi, she is corrupt, and of course, her emails. None of those paint her in a flattering light and in isolation they are all concerning. But it turns into a matter of priority. This is what Trump supporters need to understand: she is flawed. But she isn’t talking about banning a whole religion from the country. She could have and probably did make shady deals. But she isn’t talking about how it is ok to sexually assault a woman. She is establishment, and perhaps she cares more for establishment interests. But she isn’t talking about inciting violence or questioning the foundations of our democracy. She may have accepted donations for favors. But she isn’t talking about using nukes or blowing ships out of the water.

I have never felt scared in this country before. That’s different now. Trump’s senior-most advisers are alt-right fanatics. He has regularly courted the white-nationalist and white-supremacist segments of society. He refuses to disavow them as well. I’m not white and I’m an immigrant. How is that supposed to make me feel?

My opposition to Trump is not simply policy. It has nothing to do with the fact that he was on a Republican ticket. It is something far more fundamental; it is about what it means to be an American and a good human-being. It is about how we treat each other. It is about transcending our differences instead of magnifying them. It is about who we are as a society. It is about staying true to the principles that founded this great nation. It is about the statement that we make to the world about who we are as a country. It’s not just about the next 4 years, but the next 400 and where we need to go as a civilization. I really thought we were there. I really thought we were close this time. I really thought that we could start fixing some of the brain-dead decisions that got us here. I really thought that we could actually tackle climate-change. I really thought that we could do it right this time. The irony of all this, is that Trump supporters will never realize is that they not only voted against my interests, but theirs as well. And that is why this hurts so much.

An alarmist future?

If Trump gets elected, I think humanity as a species has failed. Not to sound dramatic, but the choice should be obvious. It’s like you’re offered two bottles: one labeled water and the other labeled Ebola. Which one do you choose?

This probably sounds stupid. But ever since I first saw Star Trek, I knew I had found a goal. My goal was to do everything I could as an individual, to make that kind of future a reality. I know that I will never live in such a future, but I wanted to do my part to get us as a species, ever so much closer to that reality. I looked forward to a world where the only label we assign to each other is “Human”.

Trump is the antithesis of all of that. He stands at the polar opposite of such a future. If Trump gets elected I have very little hope for the future. Ronald Reagan saw America as a “shining city upon a hill” (a phrase from John Winthrop, an early Pilgrim) – it was a place where “if there had to be city walls, the walls had doors and the doors were open to anyone with the will and the heart to get here”. Ronald Reagan’s America is inclusive; not exclusive. He described it as a proud city, built on rocks stronger than the ocean; a country built on principles that have sustained it for over two centuries.

I have felt that America, even with its numerous flaws, has largely been a force for good in this world. When America decided to take on the mantle of being the world’s superpower, it also inherited the responsibility to do so wisely. As a nation America has made many missteps in this regard, but has also had many successes. Whether nations may admit it or not, many do look to the United States for direction. Trump’s vision threatens all of that. Europe is seeing the resurgence of extreme right-wing nationalism. There are disaffected people everywhere. Feeding into this is rising xenophobia and the desire to blame circumstances on outsiders. This is driven by a migration crisis, which by the way, will be nothing compared to the future ones we will see once the full effects of climate hit us within the next decade or so. Electing Trump will only legitimize and give further traction to these extreme right-wing movements in Europe. This is not a joke; no one saw Brexit coming, and it was largely driven by the same sentiments that are driving right-wing nationalism in mainland Europe.

In the early 1930’s there were a few fascist groups in United States. One of them was the German-American Bund. It was universally rejected by Americans who were repelled by their first exposure to European fascism. How different would the world be today, if a significant fraction of the nation had accepted it? What if there was someone like Trump at this point in time? Imagine a World War II with the United States on the side of the Axis Powers; imagine the outcome.

I am not trying to be alarmist. I honestly feel that we are at a critical point in the history of our civilization. I don’t want to assume the worst, but it’s hard not to. Is our cultural memory really so short that we are going to repeat the same mistakes from more than seven decades ago?

If Trump gets elected, aliens may one day come upon a dead planet and say “See, here’s actual proof that having intelligence doesn’t make you smart. These guys were intelligent, but they still killed themselves anyway because they were stupid.” I’d rather we find them first to disprove that notion.

A Trump presidency does not seem outside of the realm of possibility. That terrifies me. Even if he is elected, I hope the worst does not come to pass. It’s not just the future of America itself that is at stake; it’s the future of our global civilization.

Sci-Fi Fever Dreams

Yesterday when I finally fell asleep, I was running a fever of 102.5 (it broke last night and I feel much better today – I think I’m over whatever I got). I then had a dream I was in a TV show – something like Stranger Things. At least that’s how it started out. Something weird was going on at some house where there was a hole to a parallel dimension and a team of investigators had shown up to check it out. I was part of this team. For whatever reason I had a sweet pair of polarized sunglasses with me. Don’t know where I got them from, but they looked really cool and they most definitely didn’t belong in the 80’s. Everyone kept talking about how cool my shades were and I agreed; they were cool.

We were looking at the lawn where there was a burn mark due to the paranormal occurrences at this house, when I noticed that I would see a strange pattern on the lawn only when I wore the shades. No one else could see it. I lent my sunglasses to the other investigators and then they could see the pattern too. When they wondered why, I said “Well, my glasses are from 2016” (as if that would explain everything). They laughed because it was only 1986. I think at that point I realized that I had somehow time-traveled to 1986 and ended up as part of this team. Anyway, I then realized that the pattern I was seeing on the lawn was basically a series of gears; kind of like what you would see in a clock. Furthermore, the gears were moving. That’s when I realized that what I was looking at was time itself! The glasses helped me view the entire dimension of time using this metaphor. But not just view it…

I decided to say “Go back 10 seconds” while wearing the glasses, and I went back 10 seconds in time! So apparently that was how I had arrived in 1986, but I had forgotten that critical piece of information. I don’t recall what else I did with my new-found power but I vaguely remember time-traveling to 1991 and ending up in my old house in Darsait, Muscat as my younger self. So it appeared that the glasses had a sort of Quantum Leap-esque power too. Unfortunately at this point I either woke up or the dream transitioned into something else because I don’t remember what happened next.

My data-recovery story

I was looking through wayback machine at snapshots of my website, when I came across one from 2005. It reminded me of something I had almost forgotten. At some point in 2005, the network card in my FreeBSD server started to die. I got myself a new card and set about replacing the dying one. I can’t recall why anymore, but I guess I had needed to disconnect the hard-drive at some point. I remember that after I plugged it back in and booted up, I was greeted by a screenful of terrifying error-messages. Something horrible had happened to the drive that held my home directory, my website source-code, and my database. I had lost about 6 years worth of posts and images on my website. My first instinct was to power down the machine to prevent anything more being written to the drive, which I immediately did. After that I think I tried a bunch of disk-recovery tools to try and recover my data. But this was difficult because the filesystem was UFS. I can’t remember if there were any UFS recovery tools at the time, or if I tried them, but I remember having tried almost everything I could think of.

Out of desperation, I think I finally decided to use dd. I started dumping the data from the drive using the lowest size-setting possible in dd (I want to say it is a byte, but I don’t really remember). I then piped this into a perl script that would examine each byte, looking for magic numbers. The drive had been corrupted so badly that there wasn’t even any trace of a coherent filesystem anymore. I knew that the data I was getting were most-probably fragmented, but I didn’t care at this point. I would guess the file-type by looking for magic numbers, and then I would start dumping that data into a file until I found an ending marker, or if the file-type didn’t have one, until the start of another magic number. I remember having various settings in the script so that I could tune its behavior, especially when dealing with false positives. My priority was to retrieve my pictures, website, programming projects, and database. For my source-code I only had to look for ASCII data. For pictures I looked for file markers for JPG, PNG, and GIFs. The database was difficult though, because I was using MySQL. By sheer chance, I had decided to take a SQL dump of my website’s database the day before for backup purposes (ironically, on the very drive that would die the next day). This was ASCII data, and so it was one of the first things my script found.

I ran this script over a couple of hours I think, and then for most of the next day for good measure. Then I began the tedious process of sifting through these files, weeding out false positives. All said and done, I retrieved a good chunk of my data. I think I got back around 80% of my pictures, and almost all of my code and website source. It was a scary few days, but I’m glad that my desperation drove me to try something like this!

Doing front-end development IS such a pain

This is so true that it’s hilarious. And sad. Any time I try to do something a little nontrivial for the front-end, it goes downhill so quickly. It’s like you are at this bizarre Home Depot with a million tools and you aren’t quite sure what they do because the most of the instruction manuals are missing pages or are just completely absent. There are very few that are complete.

You went there trying to get some nails and a hammer to hang a picture at home. But the nails only come in package that includes a lava lamp, a sledgehammer that weighs 50 lbs, and 217 blocks of assorted shapes, sizes, and colors. You get a hammer that seems to be the most popular but then you read a blog post from a carpenter ninja rockstar who has come out with a new hammer-design (and a cool name: “Hamm.ür”) that everyone is raving about and is a huge improvement over the new one and has started a new company that is already building and selling it. Home Depot also just happens to have it. You decide to get the new one; the old one wasn’t that actively supported by the manufacturer anymore anyway. In fact, it was just made by one guy in his garage and no one had seen him in a year and he rarely answered his phone or responded to emails. The new hammer does also come in a package with other stuff but at this point you really just want to hang that picture because that thing has been sitting against the wall for months.

You get home and finally start to hammer in the nail but end up burning your house down because the hammer replaced the lava lamp’s power adapter with a bare copper wire that set your curtains on fire. When you complain that using bare copper is unsafe and that they shouldn’t come with hammers or replace power adapters in a lava lamp that you didn’t even want in the first place, because seriously why the hell does anyone sell lava lamps with nails, you get told “Stfu noob! Copper is like the second-best fucking conductor and it is cheaper than silver and bare copper is so much lighter than a whole stupid adapter; seriously weren’t you just complaining about not wanting extra shit with what you buy?”

Don’t use class literals as type-tokens

Generics were added to the Java language within J2SE 5.0, and there was much rejoicing. It was finally possible to deal with containers in a type-safe manner. Prior to the availability of generics, Java developers had to do things like this:

List people = new ArrayList();
people.add(new Person("Donkey Kong"));
people.add(new Person("Guybrush Threepwood"));

Person pirate = (Person) people.get(1);

This kind of code is very fragile since it is not easy to keep track what is inside a container. If at runtime, the object you retrieve is not of the type that you’re expecting, you can get a ClassCastException. It is also remarkably easy to pollute a container by shoving objects of different types inside there, which makes it even more difficult to keep track of the types of the objects inside. Workarounds included littering code with instanceof checks, or creating a wrapper class (for example a class called PeopleList that would delegate to an internal List instance) around the container so that you could have control over the types of objects being inserted.

When generics finally arrived, people were ecstatic because now you could do things like this:

List<Person> people = new ArrayList<Person>();
people.add(new Person("Donkey Kong"));
people.add(new Person("Guybrush Threepwood"));

Person pirate = people.get(1); //It just works!

This meant no-more ugly workarounds, which means that things are awesome! Right?

Read the rest of this entry »

Heroku template for Spring 4 app with Oracle Java 8 and Tomcat 7.0.54

I’ve been playing around with Heroku at work for the past week or two. Heroku is pretty awesome if you want to get an app up and running quickly. Heroku does support Java and they have a few Java templates. Their current offering for Java uses Spring 3 and Tomcat 7.0.54 with Java 7. However, the version of Spring is somewhat older and they also use OpenJDK’s Java instead of Oracle’s Java. I wanted to try out Java 8 and also use a newer version of Spring so I upgraded the existing template to support both of those (I used a forked version of a custom buildpack for Java 8). I also had to update Heroku’s Web Runner to use Tomcat 7.0.54 (I have a pull-request waiting but I’m not sure if/when it will get approved so I have an artifact on GitHub that Maven can pull).

You can check out the template here.

All original content on these pages is fingerprinted and certified by Digiprove
%d bloggers like this: