jQuery + Redux

I was having a discussion about Javascript frameworks recently, and it occurred to me that it should be possible to use Redux with jQuery to create a much cleaner application.  This would be appropriate for legacy applications, or for simpler pages that simply don’t need the overhead of React/Angular/ES2015 etc.  Take a look!

http://danieltsadok.net/redux-jquery/


Introducing GerryMonsters

GerryMonsters, or Gerrymandered Monsters, is the latest monster craze to hit the youth scene. The first GerryMonster battle is between “Slope Rex”, or New York State District 21, and a pack of “Bridge Bugs”, or New York State District 26.  Will Rex’s raw power be enough to fight off the Bugs’ barracuda-like swarm?  Stay tuned to find out…

 

Thank you to Ballotpedia for the source material!


The Truth Is In There

Recently, particularly since the shocking results of the 2016 U.S. Presidential Election, and the scourge of fake news and other lies that supported those results, there has been much speculation as to whether we are in some sort of “Post-Truth” era.

This is sheer nonsense. “The truth” consists of mental, psychological, and presentational fidelity to reality, or what Jacques Lacan refers to as “the Real”. We have some influence on reality through our speech and actions, but otherwise reality is non-negotiable (including the reality of our own speech and actions). The idea that we are in a “Post-Truth” era, therefore, is equivalent to believing that we are in a “Post-Reality” one. Ultimately, as Lacan, along with so many others, point out, this reality will always trump whatever mental gymnastics we humans employ in the process of divorcing ourselves from it.

It is true, as Sigmund Freud and others have pointed out, that we are incapable of fully grasping reality, and therefore our truth, that is, our best and most accurate model of reality, is always an approximation. It is simply impossible to separate our ego, preferences, perspective, and senses in any sort of objective way from our perception of it, so in that sense, truth is subjective. However, it is possible to identify when truth, or fidelity to reality, is being distorted, either deliberately or not, through that egocentric medium.

In other words, people can lie, and those lies have the quality of being lies: fabrications, or constructions, that exist solely in the mental plane, with no other connection to reality. The truth is what is left when those artificial mental constructions are eliminated.

“The truth has not to be achieved. It cannot be achieved: it is already the case. Only the lie has to be dropped.”
Osho

Freud’s genius was to see that many, if not most, psychological problems, including a variety of neuroses, were the result of a disconnect between one’s situation and one’s perception of the situation. In other words, one deviates from the truth at the risk of their own mental health. From this perspective, at the core of “Post Truth” is nothing other than schizophrenia.

“Truth shall sprout out of the earth, and righteousness looks down from Heaven.”
Psalms 85:11


Not-So-Smart Contracts

So-called “Smart Contracts” are a nightmare waiting to happen. Based on Bitcoin, Smart Contracts are essentially software-based legal contracts that programmatically execute financial transactions when certain conditions are met. For example, a smart contract could be written for a loan such that if borrower misses a payment, the lender could deduct the loan payment, as well as a hefty late fee, from the borrower’s account, automatically, with no recourse available. Interest rates could fluctuate literally with the weather (simply by tying the conditions of the Smart Contract to a weather API), or even be based on a random number. Connecting Smart Contracts to the even more dystopian “Internet of Things” means that if a person is thirty seconds late to work, they can be docked pay automatically, as soon as they walk in.

Smart Contracts have two major flaws. The first is that they couple personal finances, transactions, arbitration, and enforcement in one terrifying monolith. This means that instead of parties in dispute going to small claims court (arbitration), say, and seeking a judgment (enforcement) against the other, so that they can receive a payment (finances) from them, the Smart Contract combines all of these steps into one algorithm. The theory justifying this dangerous approach is that people are inherently untrustworthy, and presumably, that software is not. Ethereum, the most prominent organization developing Smart Contracts technology, brags that it “allows people to safely interact trustlessly”, and the original Bitcoin whitepaper talks about “the inherent weaknesses of the trust based model”, and calls for “cryptographic proof instead of trust”.

From this perspective, the second flaw is even worse. Ethereum uses an object-oriented language called Solidity to write Smart Contracts. From their documentation, “Solidity supports multiple inheritance by copying code including polymorphism.”.  Object-oriented programming has all sorts of complexity problems, but one of the worst is multiple inheritance.

Multiple inheritance is its own disaster waiting to happen: it introduces the possibility of something that Bob Martin calls the “deadly diamond of death” that creates ambiguities that are problematic in interface software, and potentially disastrous in financial applications.

Meanwhile, this is a “simple Smart Contract” from the Ethereum documentation (the word “simple” appears many times in this document):

pragma solidity ^0.4.0;

contract Coin {
    // The keyword "public" makes those variables
    // readable from outside.
    address public minter;
    mapping (address => uint) public balances;

    // Events allow light clients to react on
    // changes efficiently.
    event Sent(address from, address to, uint amount);

    // This is the constructor whose code is
    // run only when the contract is created.
    function Coin() {
        minter = msg.sender;
    }

    function mint(address receiver, uint amount) {
        if (msg.sender != minter) return;
        balances[receiver] += amount;
    }

    function send(address receiver, uint amount) {
        if (balances[msg.sender] < amount) return;
        balances[msg.sender] -= amount;
        balances[receiver] += amount;
        Sent(msg.sender, receiver, amount);
    }
}

Got it? Will your technolawyer get it? This is “the simplest form of a cryptocurrency” (their words). Here is another contract that I wrote, using inheritance:

contract my_mortgage is a_great_mortgage {}
contract a_great_mortgage is a_subprime_variable_interest_rate_mortgage_that_is_enforced_automatically_and_will_ruin_your_life {}

(Hint: read it out loud)

Imagine the worst legalese you’ve ever seen, and now imagine it as computer code, obfuscated by multiple inheritance, connected directly to your bank account, with no possibility of appeal in court, based on protections afforded by law, as that would presume a “trusted third party” for arbitration. Software inevitably has bugs, and I am not encouraged that the primary language for Smart Contracts will reduce their number. In fact, it is painfully easy to see much bad software being written with Solidity.  Ethereum argues that “one of the many advantages of having a robot run your organization is that it is immune to any outside influence as it’s guaranteed to execute only what it was programmed to.”  We are supposed to trust these “neutral” systems over each other.

The companies and institutions promoting Smart Contracts are nothing if not ambitious.  CoinPrism encourages you to “store your house on the Bitcoin blockchain” (I do not). What will this mean if you agree (voluntarily or otherwise) to a buggy and/or malicious contract that happens to have access to ownership of your house?  I don’t doubt the intentions of the authors of Solidity et al, but the road to hell is paved with good intentions. Perhaps the “trust-based model” needs to be reconsidered.


Reset: Endings & Beginnings

We in the United States are in a position where the President and his associates are currently under investigation by the FBI for collusion with a (non-democratic) foreign power, which is now suspected with tampering in the French electoral process as well.  According to ongoing reporting by the thankfully still free & independent press, which the President has relentlessly attacked in true dictatorial style, undoubtedly because he understands the truth is a threat, many members of his inner circle may be violating the law by maintaining massive financial conflicts of interest.  Meanwhile, the President’s hideous budget calls for cuts to or the elimination of virtually every service that vulnerable Americans depend on, up to and including Meals on Wheels, a simple, effective program that feeds the elderly who are unable to feed themselves.  All this is happening after one of the ugliest and most poisonous elections in the country’s history.

The hateful, racist alt-right, which sees in Trump’s rise a resurgence of white nationalism, is mirrored by an increasingly angry, militant, and grim new Left, whose calls for resistance and revolution are becoming surprisingly mainstream. Stuck in the middle are millions of anxious, confused, & befuddled people who simply want this whole nightmare to blow over, and for things to go back to the way they were. They won’t. We have not yet reached 100 days of Trump’s administration, and we already seem to be increasingly at risk of nuclear war (!) with North Korea. If we manage to avoid that, the reality of climate change, which is, incredibly, being exacerbated by the administration’s policies, will inevitably bring misery and suffering to millions. We are engaged in high-stakes gambling with the future of the planet, and history suggests we are unlikely to win.

The political instability this country is facing is not the cause, but a symptom of deep trauma & malaise, fundamentally ethical, and also the symptom of a damaged national psyche whose origin dates at least to the Vietnam War and probably before.

“We don’t win wars anymore,” said Mr. Trump on the campaign trail. But who’s counting? Does it even matter? Who could “win” in Iraq or Afghanistan? Only for-profit military contractors that scored big no-bid contracts. Not the employees, per se, but certainly their shareholders (likely including Trump nominee Betsy DeVos).

The Iraq War was not necessarily about oil, and obviously not about weapons of mass destruction. It was really just about war, for its own sake: a way to stimulate the economy, create “jobs”, privatize socialized property (including oil), and manufacture and test new weapons. There was nothing to “win”, and no real reason to. In war for its own sake, there need be no victor: destruction and production are enough. “Nation building” means digging a hole, then filling it. Rinse and repeat.

That the whole botched “Shock and Awe” disaster has resulted in a new virulent religious death cult that is plaguing the world today simply creates another business opportunity to invest in: increasingly intrusive “security”, which Americans have been the “early adopters” of ever since. In the public sector, the increased demand for security has resulted in an increasingly militarized police.

So Mr. Trump obviously misses the point when he talks about “winning wars”, apparently thinking that they are about international contests rather than free enterprise. His even more hideous vision of war, that of white nationalistic conquest, in which black and brown people are forced into their “place” in a fictional, invented, endlessly disproven fantasy of racial hierarchy (a fantasy which, if it did not necessarily win Mr. Trump the election, obviously did not cost it for him), can only result in a literal Hell on Earth: something genuinely apocalyptic, for whites as well as everyone else, as implementing his vision would result in the suppression of all diversity and dissent, and likely any kind of individuality whatsoever. It requires everyone to be a square peg in a square hole, and Heaven help those who cannot or refuse to fit. This is Fascism at its core: conformity to an racial ideal is impossible for anyone (no matter how close they seem to be), and ultimately pointless anyway. It’s easier and much more fun to be yourself.

In any case, his awful agenda involves sawing off the branch on which we all sit, by detaining, deporting, and harassing massive and critical segments of the U.S. workforce, and pissing in the well from which we all drink, by gutting any semblance of environmental protection (of course, those are only the two of the more disturbing parts of his platform, and ignore his attacks on health care, education, the arts…).

Our world is already on the cusp of climate disaster. The seasons are being eradicated, and the weather is increasingly chaos. Temperatures vary by twenty, thirty, or more degrees Fahrenheit in a matter of hours (this is typical of a particular kind of climate region: the desert). All this in addition to the usual widespread toxic pollution that does not necessarily affect the climate, merely human health. The current administration’s literally suicidal approach is not only to do less to prevent all this, but to accelerate towards oblivion with maniacal abandon. And there were already attempts by the administration to stifle scientific reporting before Mr. Trump even took office. True, there are profits to be made by razing rainforests to produce disposable paper cups and palm oil, but at a certain point, we run out not only of ancient forests to destroy, but also of clean water to pour into the paper cup (of course, privatizing water is big business as well: the workings of supply & demand here are painfully obvious). The opposite of “Sustainability” is “Death”. We must choose Life!

The film “Mad Max: Fury Road” is a tragic, beautiful, & horrific vision of our world one click away from oblivion. The world is desert, overrun with violent gangs racing to the bottom, competing over what little food & fuel is left in the world. Humanity is ravaged with disease, and extinction seems almost preferable to the degenerate, illiterate, brutish, and miserable life the few remaining survivors lead. Few in the audience would trade places with even the “elite” of that deranged world.

This essay is primarily a prayer that we avoid that ruinous path. When the results of the election was announced, I personally plunged into an emotional darkness that I know many others across the country felt. It seemed that the bottom had fallen out, and the hell-world of “Fury Road” was just one of the possible fates looming far below that we risked plummeting towards, in free fall. It is no small miracle that we haven’t, largely because a collective “NO” has reverberated from so many corners of the country and the world. Whatever the outcome, this “NO” has shook the world.

“Now what?” is the daily/weekly/monthly question that has been asked since the election. Now what, indeed? Will the genie go back into the bottle? Will our economy continue to be based on disposable cups/plates/towels/napkins/clothing/furniture/phones/cameras/cars and virtually everything else? Are we going to continue to demonize the poor even as our systems demoralize and destroy them? Are we going to continue to try and quantify and measure every aspect of every human being as “Big Data” in order to rank them and classify them according to some misguided and asinine formula or algorithm, in a manner akin to phrenology? Are we going to continue to strip any semblance of privacy & dignity from every person while normalizing the sick fiction that the virtual world is a healthy place to maintain our social lives? Are we going to continue to treat art & culture as nothing more than a commodity to be bought and sold? Are we going to continue to hate, fear, & denigrate the “Other” as we excuse and ignore the most heinous acts from “our team”?

Or will we finally, finally, finally, halt our madness with the simplest of attitudes: one of prudence, humility, non-violence, & respect, and perhaps, eventually, trust?


Functions

Are people like functions,
getting called,
taking their arguments,
ultimately to exit,
yielding their return value?


A Nation In Crisis

American officials have recently asserted that the 2016 Presidential Election may have been tampered with by a foreign power, by unlawfully gaining access to the information system one of the two major parties in favor of the other. We have also seen a massive disinformation campaign through social media and entire professional-looking fradulent news websites which cropped up just in time to sway the election, again in favor of the same candidate.

Given the gravity of this accusation, a full investigation is needed, both by the Executive branch and Congress. The Electoral College should and must postpone its duties until this investigation is complete. Any other course of action risks compromising the security of the United States of America. If a full investigation reveals that a foreign power did not, in fact, intervene in favor of one candidate, the Electoral College should certainly carry out its duties as intended. But given the unprecedented and dangerous nature of this accusation, I am in favor of a postponement, pending investigation.

A word on motive and motivation: I am not writing this because “my side lost”, per se, given that I never felt personally that “my side” was ever represented in the first place. I am writing this because if these official allegations are true, then this is simply the most prudent course of action: allow our Republican-led Congress to lead a formal, nonpartisan investigation of the allegations before the Electoral College convenes.

A delay is unfortunate, and uncomfortable, and may even make many voters angry. But again, if these allegations are true, the truth must be determined before it is too late.