Monday, October 1, 2018

on being in a trumpist's shoes

TL;DR: there might actually be rational reasons to support trump. the article below is an attempt to put myself in their shoes and see how it feels, in an attempt to understand where magas are coming from.

 

NOTE: i contend that a big reason for the large and growing divisiveness of our american political climate stems from people talking too much and listening not enough. as i mentioned in my last article, the problem isn't that we're divided per se, rather the problem is that we have no right to be divided before we truly understand the perspective of those who think differently than us.

your media bubble of choice will completely invent a caricature version of your opponent for you to attack. it's easier to win a debate with a strawman edge-case version of your opponent, than the otherwise valid ideas of your opponent.

so for this article, i'm going to try to write this as if i'm a trump supporter. i'm going to do my best to really understand why they feel the way they do, and more importantly, try to show where the natural end result of what they all want would be taking us.

ok here we go...

ahem... (pulls on a kanye west styled red #maga hat)

the american people have spoken!

duty, honor, standards, ethics, morals, pragmatism, cooperation, are nice, and well-meaning.

these values that john mccain laments are gone or eroding from our culture. and yes, all of these value have their place at certain scales of human interaction. but these values, as the basis of a national political structure, they've all failed us. the corruption of the pre-trump conventional political structures (one obvious example being the clinton machine) have all failed us. trump is achieving results by replacing these values with business principles that actually work: loyalty, winning, self-interest, profit, identifying and crushing enemies, and a political shift that is bending toward giving the president more power, to accomplish more, by eroding the outdated three-branch checks-and-balances model. 

meaning, just like someone who is president, ceo, and chairman of a company, whatever trump wants, a trump-supportive congress should simply provide (rino's and lefties need to just get out of the way), and a trump-supportive supreme court should simply declare constitutional. at that point, they become three branches in name only, and just make everything more efficient by allowing The Leader *we chose* free rein to move this country toward the vision we pulled the lever for.  

(hmm, this is starting to smell like something. eh, nah, let's keep moving.)

while the donald has serious personal flaws and suffers from some toxic psychological issues, so what? blah, blah, yeah, we all do. anyways, the undeniable fact is, it took a trump to disrupt the entire corrupt disfunctional system, and show us through his life, and now his term, that the pursuit of happiness is measured by Results, everything else is secondary. the jury is in: the ends are more important than the means, period full stop. trump's moves toward isolationism are working, and so are more americans. recent economic metrics show that very clearly. 

as for those around the world who dismay over america's evolution away from a loving and giving beacon of freedom, well, they really should let that one go. maybe that was all true, or maybe it was just something cooked up by the America Inc marketing department, but in the end, let's be clear, america is now fundamentally disinterested in anything outside our borders that doesn't generate us a profit. win-win is a kumbaya illusion. fact is, in the end, we have enemies who will not shed a tear if america collapses like rome. in fact, many would party. and i think we all know who they are: hint, they've been invading america and europe for decades, infesting us, playing the long game. so to prevent this requires that we understand that survival depends on winning, nothing more. it's simple folks.

1. if we don't win, we lose.
2. we cannot let anyone want to win more than us, else we lose.
3. we cannot win without forcing that opponent to lose.
4. history will judge us as right, because history is only written by winners.

as for foreign policy, these countries need to start looking out for themselves. figuring out who they are and what they want to be. we are no longer anyone's role model, and we can no longer afford to foot the bill to police the world. foreigners can continue benefitting from our products, services, and technological innovations, but they can do so by continuing paying for them. and when they have resources we need in order to sustain our winning, we will pay for them, or find a way to take them. sounds rough, but check history, folks. it's really been the only way it has ever worked. you know i'm right.

americans are speaking loud and clear. today's results are what we want. today. as for our concept of a long term view, that's what quarterly reports are for. that's it. anything beyond that has too many variables to control, and too complex to waste time thinking about. as for the old core principles for maintaining the foundation of freedom so that future generations decades and centuries from now have place where they can be free. sorry, that is no longer important to us. today's results are on us. tomorrow's results are someone else's problem.

everything above, while billions across the world, many within our own borders view as a disgusting way to run a country and lead a world, is how business has worked for centuries, and not many have had a problem with it. trump is showing us now that while a business approach has always been looked down upon as a basis of international geopolitics, it actually works in this realm too.

i don't think trump hates kim jung-un, i think he envies him and aspires to be him. or maybe it's both. the problem with kim is this: his failure stems from the fact that his family built a dictatorship on top of a structure that is completely unproductive. 

as for putin, trump is obviously inspired by him. putin took an cultural and physical infrastrcture built up for almost a century by communism, and replaced the top tier with a layer of capitalistic oligarchy. it's working out pretty well for him, unconstrained by a pesky media, human rights constraints, or a shackling constitution. communism built for him a cultural and political infrastructure that ended up giving him total authoritarian power.

the foundation trump inherited was even more productive than russia, which should work out even better. 

trump's problem is that he has his own unique constraints kim and putin never had to deal with. there's an american independent media who digs into and exposes everything, dammit. putin doesn't have to deal with that shit. not to mention a pesky constituion that gives him so much less power than putin has. 

so the first war is against the media. repeat your claims of fake news so often that it eventually sticks. as a result, people distrust the media, probably more than we ever have. i mean, to trump, the best measure of a media outlet isn't their truth ratio, it's their ratings. well, you don't get ratings by telling truths, you get ratings by telling the audience what they want to hear. so, two years into that war, it's going really well. majority of americans don't trust the media. 

next up, second war is against federal agencies and civil servants. they control too much and are politically motivated. get your citizens to not believe anything they say. that one's going well too. 

the last war is on a US constitution that provides him almost no power. i can hear him now:

"[trump voice]

hey folks, this old constitution?
is on its third century, amirite?
it's time we all grew up don't you think? 
what would it hurt for us to take a look at this thing? 
maybe rewrite it so that it reflects modern ideals? 
look people, even jefferson said that this thing isn't etched in stone, the quote on his monument about the little boys pants not fitting as a man or something like that. 
or was it his coat?
i don't remember. not important.
anywho, 
this constitution here? 
so outdated, so sad really. 
no one in the world is dealing with something this old. 
it's holding us back. believe me. 
ok, so let's go with jefferson on this. 
constitutional convention, who's with me?
i mean, right after i get this judge confirmed.
you know, the party guy, who's pretty sure i can't be indicted while in office?
maybe the constitutional convention can help me with the after office stuff too.

[jimbarry takes the #maga hat off]

yep, that's coming. ask trump supporters, as much as they love the constitution (or rather, their cherry picked version of the constitution; kinda like their cherry picked Bible) if they'd want to see a constitutional convention to rewrite it from scratch. i bet most of them would.

don't the trumpists see that a congress and judiciary that rubberstamps what the president wants pretty much turns him into a third-world dictator? no? really? no? hmmmm, ok.

eww... ok, that was interesting. i feel grimy.

Saturday, February 24, 2018

on political divisiveness, part I

TL;DR: it makes perfect sense that we as americans aren't always going to agree on how to deal with issues that affect us and sustain our society.  but when we disagree without empathy, we lose the ability to work together, and put our energy into fighting rather than resolving.  freedom is selfish, and to some degree it should be. citizenship is unselfish and we should all make that a priority from time to time too.

 

here's a huge problem i have with many of today's social media fueled conservatives. in short, they're dishonest:

in order to boost their own snowflake self-esteem, fuel their confirmation bias, and avoid the inconvenient trappings of cognitive dissonance that we all should feel from time to time (because none of us know every goddamn thing), those in the center mass of the today's political right, find the most extreme nutcase people (socialists, mainly) and ridiculous extreme behavior of the far edge lunacy of the left, and prop those up, with spotlights and all, presenting it as the center mass majority of the left, and thus get to rest easy in your assertion that it's their own position that's the only reasonable path for this country to progress forward.

meanwhile...

here's a huge problem i have with many of today's social media fueled liberals. in short, they're dishonest:

in order to boost their own snowflake self-esteem, fuel their confirmation bias, and avoid the inconvenient trappings of cognitive dissonance that we all should feel from time to time (because none of us know every goddamn thing), those in the center mass of today's political left, find the most extreme nutcase people (fascists, mainly) and ridiculous extreme behavior of the far edge lunacy of the right, and prop those up, with spotlights and all, presenting it as the center mass majority of the right, and thus get to rest easy in your assertion that it's their own position that's the only reasonable path for this country to progress forward.

then, those with internet troll-like tendencies, spout their one-sided horseshit, chasing it quickly with declarations of great lament about how this country seems more divided than ever.

yeah, perhaps it is. and if so, then it's exactly your intellectual dishonesty that's doing it.

  • if you talk more than listen.
  • if the source of your frustration ends up with you asking yourself "why don't more people think like me; they must be idiots".
  • if you don't for a second, try to understand the position of the other person, ignoring what your chosen news media bubble tells you what they want you to know about that other person.
  • if so, then you (not "them") are the cancer that is splitting this country.

if you're confident in your position, here's a challenge:

regardless of which political "side" you're on, try this. write down 10 reasons why you think those on the "other" side believe the way they do. and none of the 10 can be reasons fed to you from your bubble, but real reasons that real people have for believing that their values are those that are best for the country. because not only should you be able to; it should be easy.

because if you cannot do this easily, then you are this country's divisiveness. then you are to some degree an enemy combatant of this nation. you are dishonest if you don't even take the time to understand your opponent before you decide that they are your opponent.

but what about hypocrisy?

a lot of dishonesty here... and don't even get me started with those who believe their highest purpose of fueling and debating their side is to expose hypocrisy from the other side. i mean, if exposing hypocrisy per se is a valuable service (and it can be argued that it does bring exposure that leads to corrective action), then why are some only interested in exposing hypocrisy from the other team? if hypocrisy is bad (and it is), and you've chosen the path to expose it (good on you), then expose it. everywhere.

but if you're only interested in exposing the other team, while ignoring your own, well, isn't that itself an example of the hypocrisy you hate so much?

if you think that maybe this shoe fits, then perhaps the rest applies...

i guess perhaps one might think, well, who am i to affect an entire country?
well, yeah, no one individually can, really.

but then, there's that saying about how no drop of rain blames itself for the flood.
well, that's part of what citizenship is. one does what's best for the country, in all ways big and small, above and beyond what's best for *my team*.

if you've chosen a team, and to change your mind later feels like an admission that maybe you've been wrong all along about some things, and that causes you to ignore those thoughts. that's cognitive dissonance.

if you stand for the flag and anthem, and have contempt for those who don't, that's fine. most of us do. but it takes more than standing for the flag, acting like a patriot, acting like a citizen. putting on a show, and being angry with those who refuse to be actors like you. no. standing for the flag is supposed to be symbolic of your actual behavior, it's not just for show. it's not so that you can act like a patriot when the anthem plays, but then turn around and live your life as an american tearing this country down.

why don't we all derive more strength and more purpose, not by more tightly clinging to what we previously decided, but by realizing that the more we learn, the more we realize how much we still have to learn. and that changing one's mind from legitimate new information is a strength, not a weakness. it's exactly the philosophy that drives science and has advanced us as a society and as a species. it advanced us all the way from banging rocks together, to banging moon rocks together.

"my team" territorialism is best left to the reptiles and lower mammals.
let's allow the escapism of sports feed that vestigal remainder of our dna.
let's not allow it to resist our evolution as humans.

if you enjoy the benefits of being in a society, then occasionally your words and actions should reflect and support the good of society.

freedom is selfish, and to some degree it should be.
citizenship is unselfish and we should all make that a priority from time to time too.

america isn't just about freedom. it's also about citizenship. they balance. and we as a nation advance united.



Monday, February 19, 2018

on browser detection with javascript

wow. when it comes to using javascript to build custom web applications, if there was one thing i thought would be easy to do is have the app figure out what browser type is being used. nope.

many years ago when i first starting learning javascript, detecting the browser was pretty essential, because at the time browsers varied widely in how they implemented javascript. some behavior was different, some appearance was different, and on some browsers, some aspects of the language weren't supported at all. and this was long before handy libraries and frameworks like dojo and jquery.

these days? much, much better. but even still, occasionally you run into an issue, and if the limitation or bug is inside someone else's blackbox, you reverse-hack a workaround.



here's what i ran into, above.

drawing some of my own graphic labels on the map. i need the labels to sit on polygon masks that i'm also creating. the yellow masks up there always draw fine, but the labels vary.

so, come to find out that on some browsers (chrome, opera) the labels draw fine, on other browsers (msie, firefox, safari, edge) the label itself draws too low. luckily the API i'm using, i can apply an offset to juke the label to make it look better, but i need to know at runtime which browser is being used so that i can tell it how far to juke, if at all.

so i start googling around, and ran into some samples of varying age, and varying usefulness. not good enough to cover all my bases. some written for entirely different purposes, or otherwise mucked up with regex, or accounting for possibilities so exhaustively, to make the end result internationally bulletproof, but for me 90% unnecessary and tough to wean back.

then i figured javascript frameworks might help. i looked into things like jquery.browser (which its own doc says it's deprecated all over the place with no new references) and dojo/has and dojo/sniff, still issues left and right, then scope issues with wanting to have some of this code outside the AMD loader require statement, but probably my inexperience with those contributed to the problems. i need to learn how to wrestle with dojo better.

i even found this little gem on twitter:



rock solid advice no doubt, but feature detection doesn't really apply in my case since i'm not trying to call certain features or install extensions, etc. i just need to know the browser, so that i can go do my thing with the labels. i also tried an example that used ducktyping, which i suppose is a flavor of feature detection (trying to determine what something is, by testing what it can and cannot do: i.e., if it walks and quacks like a duck), and ran into more exceptions than things that actually worked. at any rate...

so i finally went brute force and found that the dom's own navigator class has a .userAgent property that contains a lot of gobbledyguk, but enough there to do some string parsing.



browsers like opera, firefox, and safari, no problem. the .userAgent returned by those browser has enough uniqueness to it.

the example above is what chrome browsers return, and while this string contains *both* the words "chrome" and "safari", the safari browser's has "safari" but not "chrome", so if i check for "safari" first, then overwrite that with "chrome" later if the browser is chrome, then i'm good. (i guess i could've used a switch condition with some fall-through), but at any rate, here's what i ended up with:


and since no workaround is so nice that microsoft internet explorer can't find a way to toss a wrench in, guess what... the javascript inside IE doesn't support the string object's .includes method!! argh. so i tried .indexOf and other similar methods, to no avail.

so i'm making my kludge a little kludgier and i'm deciding to avoid the problem for now by assuming that if i don't proactively find the other browsers, i can reactively assume "msie". i'm sure that won't hold up in the long run, but until i find a better way, i'll see how far i can get with it. oh, and don't miss the forced use of try...catch, because if you try to call .includes on an IE browser, the whole thing craps out.

i'm all ears if anyone out there has a better way to do browser detection. i'm better just about anyone reading this does. (hopefully)

end result: