Saturday, November 11, 2017

US <> Capitalism

The United States Does Not Equal Capitalism

In my not so humble opinion, this country was founded on the concept of freedom, not capitalism. Somewhere along the way I think we lost sight of that and began equating capitalism with the US, and started elevating capitalism above freedom to the point where we now have our government attempting to enforce capitalism at the expense of our freedom. What's worse, any time we have government interference in capitalism it is attacked as a communist maneuver. I am not an advocate of communism in the US or anywhere else for that matter so please don't assume that is my point here.

Consider our monopoly laws and unions. Henry Ford and his ilk went to great lengths to squash unionization, and many supported anti-unions views with the rationale being they were fronts for communists and criminals but at the end of the day from the mile high perspective are unions not just a way for the average American worker to try to reclaim some of their life and freedom? Am I the only one who reads Steinbeck anymore?

The opposite of freedom is control and control comes in many subtle forms, not the least of which is financial control. Monopolies are illegal mainly because they attempt to control us, thus taking away our freedoms in a particular area. It is a classic example of freedom controlling capitalism, and it is not anti-American and communistic to have and enforce monopoly laws, it is exactly the American thing to do if we cherish our freedom above capitalism. 

I am anti-welfare, anti-food stamps, etc. I do not agree with wealth re-distribution via taxation to enable a permanent underclass or allow the government to expand to monstrous pre proportions but I do believe somewhere along the way we have allowed the corruption that comes with money to misguide us into defending the ultra-wealthy at the expense of our basic freedoms. It is not noble to support a pharmaceutical company's excessive pricing for the sake of capitalism while Americans die because they can not afford contribute to that company's bottom line. It is not American to allow insurance companies to take nearly 80% of every dollar spent on healthcare. It is actually anti-American to place money above life, thereby depriving an American of their most basic freedom for the sake of capitalism. America does not equal capitalism it equals freedom. Push comes to shove, capitalism loses. 

Consider the American sports industry as an example. At one point these guys were dealt with as property. The wealthy owners colluded, poor-mouthed and alluded to communism when they fought player unionization. Now the greedy players share in the wealth with the greedy owners. There was obviously enough money to go around. The player's unions did not signal the end of the sport, but rather it was the beginning of more freedom for the players at the expense of the owner's bottom line (wealth distribution) which is kind of my point. It is better for the economy when more than one person can afford to buy a loaf of bread. 


Saturday, November 4, 2017

Weak Minded Strong Typing

It never ceases to amaze me the prejudice that exists within the coding community against weakly typed languages. Its almost as if variables have no rights. People can change. Why can't variables?

In the Python programming language I can write …

x = 2
print type( x )
x = str( x )
print type( x )

This is a thing of beauty. Its almost as if the variable can transcend its initial limitations and rise above to a greater social status. "I was a lowly int, but now I'm a string".

Try the same in a strongly typed language like Java and see what you get. Many programmers I work with look down their nose at languages like PERL and refer to them as write-only languages, and while I agree PERL's obscure syntax and side effect constructs can make it difficult to maintain, what language is immune to poor programming practices and sloppy hacking. 

I have worked on massive PERL code bases that were easy to maintain because they were written properly, with attention paid to coding conventions and detail. In fact if I recall correctly, when I got to Amazon in 1999 a significant portion of the code base was written in PERL. 

Lately it seems there is a push in the programming community to move towards more strongly typed languages. Even Javascript is not immune, nothing is sacred anymore. Why don't we just leave the language alone. If you are an advocate of strong typing then build your code base in that manner as a convention but don't impose these limitations on others. I have seen many Python projects that were obviously the product of a displaced Java engineer, with abstract base classes, inheritance work arounds and other rigid constructs more typical of a COBOL program than a modern programming language. 

Part of the beauty of coding in a typeless language is the freedom to not have to worry about the particular constraints of the language. Instead one can focus on the design rather than the implementation. Strongly typed languages are notoriously difficult to work with when the class structures are dynamic in nature to the point that you often feel like you are fighting with the programming language to get the job done. 

I once saw a Java stack trace that was 83 levels of inheritance deep. I can't think of anything that is that abstract in real life. 

While I can appreciate the desire to produce maintainable code I can also appreciate the benefit of flexibility in a programming language. I sure hope the result of this recent strongly typed movement is nothing more than a set of recommended best practice design patterns, and not the onslaught of a bunch of strongly typed interpreters.