Saturday, February 24, 2018

on political divisiveness, part I

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:




Wednesday, October 25, 2017

on college being free

make something free and watch people treat it like it has no value. 

an education from college, university, trade school, or apprenticeship is a thing of value. it prepares young people with the mindset and skllls they need to be productive. that productivity has value, therefore the education that got them started down the path has value as well. after our constitutionally guaranteed primary and secondary educations, up to the age of 16-18 or so, young people have several choices on what to do next to prepare themselves for the rest of their life path. 

it’s an essential part of their commitment to their own life that they invest in themselves. to reap the greatest rewards, requires the greatest investment of time, effort, and yes, money, the latter is of course compensation for the time and effort educators provide. 

individual and society, a shared commitment


a college or trades education beyond high school should cost the student a fair amount of money, along with the commitment of time and effort to the learning process. while it benefits society to have the highest educated and skilled workforce possible, society’s collective commitment to the process shouldn’t include footing the entire bill. that teaches future parents nothing about savings, and tells students and everyone else in the process that an advanced education is owed to them, or worse, that it has no value.

fix student loans, you fix a lot of problems at the same time

the problem with student loans today is that the interest on them creates a cycle where a monthly payment they can afford doesn’t even cover the interest. 

the student keeps paying, a lot, for many years, and the balance due continues to go up. in the end, after 20 years, the remaining balance is written off (who knows who eats that, probably taxpayers), and the student is left to pay full taxes on the written off balance, often to the tune of 4, 5, or even 6 figures. 

meanwhile the banks have for decades extracted the maximum profit possible.
in other words, schools, students, and taxpayers are the losers. banks are the only winners.


it's sort of like how trump has done business. leverage finances to build something big, generate as much revenue as possible, pull out as much profit as you can, run the business until it starts losing money, protect yourself using very legal bankruptcy laws (those laws, btw, bought and paid for by the businesses who abuse them, so that, hey, at least it's all "legal"), walk away, and let the government and taxpayers clean up the mess. "privatize gains; socialize losses", yep, this is the person we elected to clean up government, and run it like a business. nice huh?

ok back on topic...

possible solution

is there a solution where banks still make money, students invest in themselves, and taxpayers pay much less than they do now? i think so.

here’s what government can do

the government should invest in the cost of advanced education by going back to heavily regulating the interest that banks can charge for student loans. i’m no financial wizard, and who knows if this is true, but in this digital age it’s hard to believe that it would cost a bank more than 1% annually to administratively process the maintenance of a student loan. that 1% could be regulated by the federal government, who could at the same time provide incentives to banks for writing loans based on quality and quantity.

rather than pouring out billions annually in grants to students, pour a fraction of that into subsidizing the 1% interest to the banks for 10 years.

here’s what students can do

they can now afford to pay for their entire education themselves. 

they can use parents’ savings, money they earn while attending school, or when those fall short, taking out 0% interest loans that cover tuition, room, board, books, and fees. 

after 10 years of 0% interest, whatever balance is left, the student can continue paying, and tack on the 1% going forward. incentivizes them to pay off the loan sooner.

what might happen as a result:
  • moving from grants to interest subsidies, government costs for student tuition might go down considerably
  • government can eliminate tax deductions for student loan interest
  • students pay for their own education fully; they own the whole thing, paid off at 0% interest in a time frame they can
  • banks stop profiting billions off the backs of students, unchaining them from the financial industry revenue stream. i’m all for banks investing and making money. just go do it somewhere else. 

Saturday, October 14, 2017

on trump's racism

is president trump a racist? i don't know. if there's evidence out there, it doesn't seem to be blatant, or show him to be one any more or less than your average rich white guy from his generation.

i think i do however understand why he walks, talks, and quacks like a racist.

is there evidence of racism? not much

i do believe that if the left-leaning news media who are could have found evidence of this over the past two years, they would have already.

i also believe that the right-leaning news media who (around the time that jeb, mario, and ted had high-hopes and money in the game) could have found evidence of this, they would have already.

so... given that there have been a lot of powerful people, with powerful money, on both sides of the aisle, with incentive to bring him down, and failing to find racist beliefs or actions, i tend to believe that the jury is still out on this one.

and, if you do find any evidence of this, during his decades of adult life, i bet you'll find that what might look like racism, is probably motivated more by green, than by black, brown, or white.

so...

so why did we elect him?

to drain the swamp, right?

hillary represented the best (worst?) example of a corrupt political empire, bought and paid for by the american financial sector. so, for the first time most of us can remember, americans were given the opportunity to destroy a corrupt political machine with one pull of the lever. we got to elect someone who wasn't a career politician. we specifically and purposefully elected a businessman. we elected a shrewd, savvy, independent, outsider, fuckyou entrepreneur.

but to win, he still needed votes, and to earn votes he needed to create enough value.

how do business people create value?

they create it in lots of ways, but here are two of them:

1) by dominating competitive markets
2) by exploiting untapped markets

for decades, it has been easy to see that trump is motivated only by finding potential value, adding value, then extracting value.

...because trump isn't a politician. remember?

right? i mean, that was the whole point of the campaign, and probably the most common reason given by people who voted for him.

objectively defined right and wrong are out, ethics are out, honesty is out (unless you can make a buck on it). all that stuff is replaced by loyalty and winning. he built businesses as cheaply as he could, then extracted as much personal value as he could until bankruptcy ended the party, at which time, he took off, taxpayers were there to pay the bill and clean up the mess. "hey, that's just smart business, folks"

how did trump use business value to crush the establishment GOP?

when there were over a dozen candidates in the GOP pool of possible nominees. trump ended up winning the nomination not because he competed better and harder during the campaign, and not because his vision of a great america was better defined and articulated (because his vision was actually more vague and less defined than the others, more emotion than logic, more fear than facts), rather, he won the GOP nomination because he refused to play by the same rules as the others. instead, he invented a new more exciting game, and then won that game because he was the only one playing.

the day the GOP shot themselves in the foot in front of a nation

omg do you remember? because if you don't then i'm all too happy to remind you. there was this debate. there had to have been 10 GOP dweebs on the stage. they were all unified in their demand that trump concede to their whim of declaring that he will support whoever the nominee ended up being. i've never before seen, and i hope never will see from now on, a more pathetic display of cowardice by a collection of accomplished successful politicians as this group who asked such a bullshit question. they were each so smugly convinced that it was them who would be the nominee,  but all so convinced that trump would not be, but that they were at the same time fearful that trump would magnetically split the party.

holy shit.

this was the moment THIS former republican lost ALL respect for the intellectually bankrupt emotionally manipulative republican party.

it was actually at that moment that it became obvious to the rest of us that trump would actually be the nominee. i mean, i still believed hillary would win the general election, but it was at that moment that i lost my last remaining respect for the GOP. this being the party i had been a registered member of, and idealistic true believer of, from 1981 to 1996.

you conservative fools. you let down your guard, and the idiot trump checkmated you all.

and you all. pricks all of you. when it came to hosting the republican national convention in 2016, which of you actually convened with your own party? bunone of you. none. of. you. proves you cared more about yourselves than your country. more about yourselves than your party. and more about yourselves than understanding what motivates the citizens who your fearmongering and tea party enabling fed and fostered, and finally grew up and blew up in your face.

i'm embarrassed to say that i was ever a member of your party. you used patriotism to manipulate good people into voting against themselves. you stuffed your pockets with wall street billions while redirecting hatred toward the poor of us who needed only a tiny percentage of that.

this was the election when it was jeb bush's "turn". it was ted cruz' "time". it was marco rubio's "below the zone" leapfrog. omg. freakin' amateurs. playing by the old rules. and now they're home sitting on their hands.

so what does this have to do with racism and white supremacy?


yeah, how about them white supremacists?

politicians normally avoid these folks, because their ideas are morally bankrupt and typically toxic to a sustainable political career.

but... when it comes to leveraging untapped markets to his profit and benefit, trump is a genius. and the angry white supremacists turned out to be a big pool of motivated voters who rose up and tsunami'd him into the white house.

...so to sum this up:

in other words: trump may not be a racist. but he pandered to them. they gave him the edge he needed to win office. and any actions (or inactions) by trump that look racist are nothing more than not biting the hand that feeds him. especially because he will need these "good folks" again in a few years.

so even if he is not a racist. he bought, paid for, and owns the racist voting bloc.

the question then is: are you a racist if you befriend racists? not necessarily, but then, if winning is the only objective, that's not the point.

Friday, September 1, 2017

on hurricane harvey, maps, and you

are you into maps?

the storm is gone, but relief and recovery will take years, and americans far away still need help.

in addition to donating to reputable charities, would you like to do some hands-on work that helps, but can't get to houston, or at this point don't want to get in the way? here's a way you can help remotely.

in short, you can get online and contribute your time and effort creating and verifying basemap data for the OpenStreetMap (OSM) project.


what is OSM? well, think of it as the wikipedia of maps. it started back in 2004 with the goal of using crowdsourcing to map the entire world. at first it was interested in mainly in mapping streets, but in recent years has grown to map a whole lot more, whether it be mapping trees within parks, locations of places to get a coffee, or even mapping departments within retail stores.


...and just like wikipedia, anyone can edit it, and the crowd verifies to keep it correct. in the end, it's a living, breathing map, and changing every day---just like the world around us.

one of the most productive uses of OSM in recent years has been "humanitarian mapping". the 2010 earthquake tragedy that struck in haiti was its true coming-of-age as a valuable tool. actual data on this varies, but let's just say the OSM team on the ground and remotely transformed haiti from a country that was mostly not mapped, to one that was, and in great detail.

and that ever growing OSM basemap was used by first responders, non-profit organizations, command center briefings, media support, the general public, and many, many other uses.

interested? want to at least check it out, and maybe get involved?

1) first, go to OSM and click "Sign Up" to create a new account

2) click "Edit", then "Edit with iD", then "Start the Walkthrough" in order to learn how to use the editing tools. it will hand-hold you through the steps. i think you'll find it very easy and straightforward. the tutorial takes maybe 10-15 minutes to get thru.

3) go to tasks.openstreetmap.us, choose a task that needs work, and follow the instructions

apparently lots of work needs to be done with getting buildings added to the map; you can just use your mouse to draw them by tracing on top of satellite photos. there's also a lot of verification work to check stuff that others did, not just with buildings, but also streets, parks, and the location of public safety facilities.

i've been editing OSM maps on and off for years, and just picked up a task and did some work on it yesterday. there's a long labor day weekend coming up. great opportunity to put in some hours.

if you want to try it, and have ANY questions with this stuff, or get stuck or whatever, contact me directly, or comment below and i can help you.











Wednesday, August 23, 2017

on colin kaepernick

alright look, here's a quote from a militant right wing friend of mine who i practically never agree with, --i mean seriously almost never ever-- yet i reluctantly do in this one exceptional case, and since he articulated it so much better than i ever could, i'm posting it here: 

I own a business and would never allow my employees to make political or social commentary to my patients. It undermines the product that we deliver in our office. Just as customers come to my business for medical care they should not be imposed upon the views outside of medicine by an employee. Same with [the NFL], I as well as many tune in to watch football, not political or social commentary, we get enough of that in everyday life. If your employees wish to do so let them on their own time out of uniform, that is their right. But while at business and I as a customer please have your business stick to the game to which I have tuned into. 

colin kaepernick is absolutely free to take a knee. and many other players are free to do so, or put a fist up, or whatever they feel they want to, to draw attention to what they feel is an injustice. free, that is, from our government "of the people, by the people, for the people" from stopping them. because in the end, the injustice they're protesting, while highly selective, is technically and measurably true. 

but free from their employer taking issue with it? no. business owners have products and services to sell. when they're paying you to help them do that, your words and actions should contribute toward your employer's vision. don't like it? then don't be an employee. start your own business. make your own rules, stick your own neck out on your own time and using your own resources, and hope that your clients are cool with it. whatever. good luck.

that said, no one owes colin kaepernick a career, or even a job. so, until he starts his own team, or his own league, and coordinates his own support staff and logistics, pays for his own venues, negotiates his own media contracts, plans and executes his own marketing engine to draw his own viewership, he needs to stfu on the job. outside of that, he is absolutely free to practice free speech on his own time. free speech unhindered by government interference, which is the ONLY thing "free speech" means.

not clear about what free speech actually means? here's a good primer: Free Speech


Monday, August 7, 2017

on russian meddling--on trump's integrity

russians meddle in elections when they can. so have we. so do we.

even as an unapologetic liberal, i can say with all factual historical honesty, that, shit, the US has been meddling in elections under the table (and quite occasionally above the table) for the better part of the past 7 decades (if not more), and it has almost always worked in our own national interest. so, like trump said a few months ago, let's not pretend that the US is pure, and that russia's meddling in our election is some aberration. please. all nations have national interests. and all powerful nations have national interests that extend well beyond their boundaries. we have national interests. russia has national interests. you want to believe russia is some evil beast and the US is some innocent waif, keep dreaming.

so to democrats:
until you really want to fix the problem, you need to let the "russian meddling" story go. it's obvious you care more about political points than the meddling per se.

so to republicans:
to ignore russian meddling is pretty much treasonous, which makes you worse than the democrats, so time to put the flag pins back on and get some smart people on fighting and fixing this.

that said? the two problems i have with trump are these:

1) while he serves his own interests perfectly, he has absolutely zero ethical integrity when it comes to public service.
2) while he is an arguably successful businessman and imposing manager, he is not a leader.

yes. he won the election. the system we built and signed up for (and haven't had the motivation to change yet) worked as designed. love him or hate him, it's trumps turn on watch for the next few years. if you salute the flag and keep your feet planted here (rather than pack your shit and run off to some european socialist utopia) you really need to respect it. american democracy and the american republic is a messy business, but in the long run, despite its bumps and bruises along the way, points mostly toward justice, as much as the humans within it will allow.

as i learned my first week of boot camp when i was 17, you salute the rank, not the man. if i met trump today i'd salute him and give him respect. if i meet him 10 years from now, i'm slicing his tires and keying his car. that's what it means to love america and the constitution, and at the same time have the balls to fight for what's right and punish those (donald trump) who've spent a lifetime hurting people while helping no one but himself.

but let's get back to exactly how trump proves to us that he has no ethical integrity...

follow me... if he had lost the election, everything about his history confirms, that for pretty much all of 2017 so far, he would have been the standard bearer of complaining about this “america first” russian meddling that hillary arranged and obama did nothing about. (because in actuality, she did, and he didn't).

in contrast:

  • the bush presidents, both of them, agree with their policies or not, had integrity. mad integrity.
  • carter, had probably the most integrity of any president of the last century.
  • rand paul, crazy man, but steadfast integrity.
  • romney lost the election because he had zero integrity. he was all pander.
  • cruz, rubio... already lost causes. maybe had integrity, but already sold out.
  • sorry to say, as of 2008, so did mccain.

i mean, you can like bush43 or hate him, for leading us into wars that cost us trillions, but you can't deny the guy had integrity. he didn't pander. he had beliefs and he stuck with them no matter what, and couldn't care less about what people said about him. crazy thick skin.

but... like romney, trump has zero integrity. actually, trump has 100% integrity to himself, and only appears to serve the nation when any particular decision that benefits himself first.

as for if he'd lost the election. whoa... he'd be on that russian meddling shit just like birtherism. just like he was prior to the election. even the electoral college was a bad thing to trump--til he won. even hillary was a criminal going to jail (and maybe she should) until he won. "hey we don't care about that anymore now do we" -trump.

but now, russian hacking is a non issue, it's fake news. why? not because it’s fake. but because trump won.

even though the US meddles--the fact that russia meddles is still something we need to fight against. and we're not fighting it. because to trump, it's a non issue because it benefitted him.

the cancer that trump infects america with, is that to him--our president and head of state--there are no longer any objective rights/wrongs beyond whatever benefits him personally. no more morals. no more ethics. only winning. and by that he means, trump winning. not the middle class. not coal miners who've been part of a dying industry for a few decades now. not carrier inc. no one but trump and anyone who can help him.

the president should serve the nation, even if decisions pull against himself personally. if that doesn't bother you at all, and you still support trump even knowing that he's actually not "america first", well, that's certainly your right. but if you disagree, then maybe answer me this. in all of trump’s accomplishments over the past 7 months. name one that benefitted the country and happened to work *against* him personally.