Monday 28 August 2017

Five things to check when your mobile is not charging

I own an Android phone, and it's served me well for the last couple years. However, sometimes it refuses to cooperate. One of those instances is when it simply does not charge even after I connect the charging cable.

The first instinct I have is to wonder if my battery has finally given out. However, there are other, less drastic reasons (read: reasons that don't involve me spending money on a new battery) that I've learned to investigate before succumbing to the inevitable.

Here, I'm going to cover hardware failures only, as opposed to erratic behavior due to software.

There are multiple points of possible failure between the wall outlet and your phone. Each of these should be investigated if your phone refuses to charge.

1. Wall Socket Plug


You know that plug that connects your USB cable to your phone? The one that you have to plug into your power outlet?

Check the plug, yo.

These succumb to wear and tear as well, though the chances of this being the culprit are minuscule. Still, the problem could just be a case of failing to plug in the wall socket properly. It happens!

2. The USB cable


Problems with the cable itself account for roughly 50% of my charging woes. This usually happens if I use the really el cheapo two-dollar cables I find in Daiso. To be honest, you'll probably get better mileage by paying more. In fact, the cable that came with your phone when you bought it, is more likely than not to be the good stuff.

This hideous pink cable with
the bent USB port only
cost me 2 SGD. Go figure.

Just confirm (or eliminate) this possibility by using other cables. If your phone charges properly, it's the crummy cable you're using and you should chuck it.

3. Lint in the Micro USB Port

Chances are, you don't keep the Micro USB Port sealed when you're not charging your phone. Who the heck does? This means the orifice (oops, I meant aperture, of course) is open and receptive to all manner of dust and particles. This could come in the form of lint from your pockets or purse, and in my case, loose tobacco leaves.

Lint, tobacco leaves
and other debris
from my pockets.
Gunk like this clogs up the port and prevents it from connecting properly with the cable. Give the port a good blow (oh scrub your mind, you filthy teenager) to clear the crap, and you should be good to go.

4. Misaligned Micro USB Port

This one requires a bit of delicacy. Constant connecting and reconnecting the cable to your port will result in some wear and tear. Sometimes, that little tab that is supposed to touch the  circuitry inside your cable, is bent out of alignment.

That little tab right in
the middle of that port.
So bend it back!

Switch off your phone and remove the battery before attempting this. Use a fine but strong object like a pin, toothpick or even tweezers. Gently slide the end of your makeshift tool under the tab and very gently push upwards. Don't push too hard; if you accidentally snap the tab off, you can say adieu to your phone.

5. Battery

Switch off your phone and remove the battery. Is it bloated like a corpse? Does it spin like a top when you twirl it on a flat surface?

Dat battery.

If the answer is "yes", let's face it. Your battery is in the terminal stages of its ailment and it's time to put it out of its misery. But really, unless you've been overcharging the battery for half a decade, it's not likely to be the case.

Lastly...

If none of this works, I hope you made a backup. Good thing these damned things are so cheap these days, eh?

This advice is free of charge, just like your phone (heh heh)
T___T

Wednesday 23 August 2017

A Storm Without A Cloud

Following the tragic outbreak of violence at Charlottesville a week back, web security company Cloudflare removed White Supremacist website, The Daily Stormer, as a customer, leaving it open to cyber-attacks. This is significant because up till then, Cloudflare had, quite admirably in my estimation, steadfastly refused to impose a moral stand on The Daily Stormer's hate-filled content. Before that, other vendors like GoDaddy, Google, SquareSpace and Twitter had already moved to deny The Daily Stormer their services. As of now, the site has moved out of the mainstream internet and may be accessed only on the dark web. No, I'm not going to provide a link - if you must read their filth, do a web search.

I took a special interest in this case because of the situation between Shopify and Breitbart News Network earlier this year. Back then, I observed that tech was becoming increasingly partisan and that vendors are being forced to take sides in the escalating political war of ideals between the Liberals and Conservatives. And my stand then, was that technology should serve all voices within the boundaries of the law. That has not changed. Cloudflare's sentiments appeared to echo mine, until unceremoniously dropping The Daily Stormer.

What caused the change of heart? Now, this in itself is noteworthy. Unlike the likes of Google and Facebook, Cloudflare's objections were not on moral grounds, nor were they pandering to the Leftists. They found the content of The Daily Stormer as repugnant as many other people, me included. No, in the words of CEO Matthew Prince, he'd had enough of their crap.

This was my decision. Our terms of service reserve the right for us to terminate users of our network at our sole discretion. My rationale for making this decision was simple: the people behind the Daily Stormer are assholes and I'd had enough.


While, he, like myself, believes that service providers should not morally police the Internet, The Daily Stormer finally pushed him too far. According to an explanatory blog post by Prince, The Daily Stormer had been proclaiming that Cloudflare were on their side and were "one of us". Already disgusted by them, Prince made a decision that even he acknowledged as arbitrary - he flexed those CEO muscles and pulled out.

Looted from Washington Post.

For some context, this is what went down in Charlottesville. White Supremacists marched to protest the taking down of Robert E. Lee's statue. There was a counter-protest by Leftists and violence broke out. No, I don't want to talk about who started it. That's not the point. The point is that one of the White Supremacists, James Alex Fields, Jr., drove his car into a group of Leftists, injuring 19 and killing a woman by the name of Heather Heyer. And if that wasn't bad enough, The Daily Stormer started posting insulting content about Heyer, and expressing satisfaction at her death.

Yep. That level of disgusting. Christ, man. Someone died. Show some goddamn decency.

Still, no matter how revolting I found their content, according to the law of the land, they still had a right to publish it. Hey, don't look at me. It sucks, so change that stupid law.

Shopify CEO Tobias Lütke noted back then, that morality is subjective and it wasn't the place of Shopify to impose their moral standard on any party. Matthew Prince seems to agree, and he noted that although he had the power to drop The Daily Stormer and actually exercised it, it was a problematic decision and he remains perturbed by it to this day.

And the dude makes a very compelling point.

Look, just because he could do it, didn't mean he should. He basically got pissed off and cut The Daily Stormer off. That would be like Sundar Pichai denying me service to my Google Blog just because I insulted his mother! It was unprofessional, and could come back to bite them. No, not in terms of The Daily Stormers seeking retribution - those little pukes have enough troubles of their own, and Cloudflare was hardly the first to axe them - in terms of maintaining tech neutrality. If he could drop The Daily Stormers because he found them objectionable, it's easy to turn it around and say that whoever he hasn't dropped must not be objectionable to him. And that is a slippery slope. It sets a dangerous precedent.

Get a load of this douchebag.

I mean, let's say for example I create a platform for people to listen to music. Even Justin Bieber's music. What if people used that to accuse me of being a Justin Bieber fan? A Justin Bieber fan, for crying out loud.

That being said...

I've developed a great deal of respect for Matthew Prince. He behaved unprofessionally (albeit in a very extreme situation), but he owned it. He could have justified it by taking the moral high ground, and he'd be in good company. But no, he didn't. He acknowledged that his actions compromised the principles upon which he had based Cloudflare, and left us with these words.
The issue of who can and cannot be online has often been associated with Freedom of Speech. We think the more important principle is Due Process. I, personally, believe in strong Freedom of Speech protections, but I also acknowledge that it is a very American idea that is not shared globally. On the other hand, the concept of Due Process is close to universal. At its most basic, Due Process means that you should be able to know the rules a system will follow if you participate in that system.

Due Process requires that decisions be public and not arbitrary. It's why we've always said that our policy is to follow the guidance of the law in the jurisdictions in which we operate. Law enforcement, legislators, and courts have the political legitimacy and predictability to make decisions on what content should be restricted. Companies should not.


Due Process. What a concept.

Censorship! You're impinging on their First Amendment rights, the Rightists protest.

What's the big deal, come the predictable cries from the Leftists. The White Supremacists are Nazi pieces of shit who don't deserve a platform to air their hateful views. We have the moral high ground!

Boy, a lot of people sure are obsessed about moral high ground these days. Go figure. The Left and Right are missing the point entirely, but that's OK. They're laypeople, and missing the point is practically an obligation.

You see, this isn't about what The Daily Stormer does or doesn't deserve. From a tech point of view, the moment one party exercises their legal right to deny technical service, this has larger implications on the rest of the Internet. It's rather more clear-cut when the violation is of a legal nature, but when it isn't, and the service provider has to make a judgement call, things get tricky. You generally want to be consistent, and the only way to do that is not to let your personal biases affect your judgement. Yes, morality is a form of bias. What a shock, huh?

Following that, the best way to not let personal biases affect your judgement, is to have a greater authority make the call. A standard due process that lets the offender know - this is not personal. These are the rules, motherfucker. You pull that shit, we're done!

When Cloudflare dropped The Daily Stormer, The Daily Stormer was left defenceless against cyber attacks from online hacktivist groups such as Anonymous, and to this date has trouble staying up. You may consider it justice, but when said justice is dispensed via illegal means and you think that's OK, you've probably been watching way too much TV. No tech worker in his right mind would endorse such a thing. We ply our living within the framework of the law. We've got a code of conduct and shit!

Being a professional.

A lawyer is professionally bound to defend his client to the best of his ability (and again, within the framework of the law) even if his client is the sleaziest lowlife on God's green earth. A surgeon is required to do his utmost to save his patient's life, even if that patient just gunned down his entire family. The Hippocratic Oath. Heard of it? Tech service providers operate in a similar capacity - while technically they have the power to dump whomever they please for whatever reason they specify, all of them try to refrain from passing any sort of judgement on the weird shit people do on the Internet. And that's really all we want to do - work on the tech, and leave the policing to the authorities.

I mean, do you really want an Internet where you can be denied service just because the geek in charge didn't like your face? Or, if you do without the protection of Cloudflare, have your website be vulnerable to any hackers who don't like your content? If we're not careful, that's where we're headed. Anarchy.

These are extreme circumstances!

I agree. Extreme circumstances call for extreme measures. Sure. You'll find no sympathy from me with regards to the neo-Nazis. Those witless bastards can rot in hell. If it were up to me, they wouldn't even have fingers to use keyboards with, much less the Internet. (The Leftists may cheer at this, until I remind them that my antipathy extends itself to Antifa and other extremist groups who use violence and illegal means to get shit done.) But thankfully, it's not up to me. Because I'm a severely flawed human being with limited perspective. Just like, whether they choose to admit it or not, everyone else.

What Matthew Prince is really saying, and I don't think that's at all an unreasonable concern, is where do we draw the line? And who draws it? Where are the checks and balances? Arguably, the entire mess in Charlottesville stemmed from people not knowing when to stop. Being unable, or unwilling, to regulate themselves.

Our Internet's as free and open as it's ever going to be. Don't take it for granted.
I bet The Daily Stormers did Nazi this coming, eh?
T___T


Saturday 19 August 2017

Web Tutorial: Text to Speech

Hey...

You know how, in those science fiction movies, the computer always talks to its user? Like, literally? Well, a close approximation of this is possible if you're using Windows and you know VBScript. You need to write the script and save it in the correct directory.

Today, I'm going to show just how.

Create a text file and save it with the extension of ".vbs". For the moment, save it anywhere you like. Double-clicking on it should execute it, if you're on a Windows computer. If not, tough shit.

First, declare a variable named speech. Then assign something pronounceable for the computer to speak.
Dim speech

speech="Hello world"


Next, create an object VObj by calling the CreateObject() function, passing in the argument "sapi.spvoice".

That ensures that the object you create is a voice activated object.
Dim speech

speech="Hello world"
Set VObj=CreateObject("sapi.spvoice")


Finally, use this object to run the Speak() method, and pass in the variable speech. You hear that? Depending on your settings and Windows version, you should be hearing either a deep male voice or a (equally deep) female voice.

Dim speech

speech="Hello world"
Set VObj=CreateObject("sapi.spvoice")
VObj.Speak speech

But you know what? "Hello world" is boring. Let's add a bit of zing to it. Let's make the voice greet you according to the time of the day.

Declare a second and third variable, greeting and currenthour.
Dim speech,greeting
Dim currenthour

speech="Hello world"
Set VObj=CreateObject("sapi.spvoice")
VObj.Speak speech


Set the variable currenthour to the, well, current hour, using the Hour() function, passing in the Now() function as an argument. You'll get a number from 0 to 23.
Dim speech,greeting
Dim currenthour

currenthour=Hour(Now())

speech="Hello world"
Set VObj=CreateObject("sapi.spvoice")
VObj.Speak speech


Now, using multiple If conditionals, set the greeting variable according to the time of the day.
Dim speech,greeting
Dim currenthour

currenthour=Hour(Now())

if currenthour<=12 then
    greeting="Good morning, "
end if

if currenthour>12 and currenthour <=18 then
    greeting="Good afternoon, "
end if

if currenthour>18 then
    greeting="Good evening, "
end if

speech="Hello world"
Set VObj=CreateObject("sapi.spvoice")
VObj.Speak speech


Next, concatenate the greeting variable to your name, and set it to the variable speech. Run your code. Does the computer give you a nice greeting?
Dim speech,greeting
Dim currenthour

currenthour=Hour(Now())

if currenthour<=12 then
    greeting="Good morning, "
end if

if currenthour>12 and currenthour <=18 then
    greeting="Good afternoon, "
end if

if currenthour>18 then
    greeting="Good evening, "
end if

speech=greeting & ", Teochew Thunder."
Set VObj=CreateObject("sapi.spvoice")
VObj.Speak speech


Let's make things even more interesting. Make the computer say random things according to the time of the day. For that, we'll create a randomizer function, and define more variables - max, min, randomno and randomstatement. Set max to 3 and min to 1. That's because we're only going to have three random statements for each time period.
Dim speech,greeting,randomstatement
Dim currenthour
Dim max,min
Dim randomno
max=3
min=1

Function getrandomno(min,max)
    Randomize
    getrandomno=(Int((max-min+1)*Rnd+min))
End Function

currenthour=Hour(Now())

if currenthour<=12 then
    greeting="Good morning, "
end if

if currenthour>12 and currenthour <=18 then
    greeting="Good afternoon, "
end if

if currenthour>18 then
    greeting="Good evening, "
end if

speech=greeting & ", Teochew Thunder."
Set VObj=CreateObject("sapi.spvoice")
VObj.Speak speech


Now, we're going to set randomno to a rand0m number generated by the function getrandomno(), then set the randomstatement variable to the result, using a Select Case block. I've set the  different phrases, but feel free to make your own!
Dim speech,greeting,randomstatement
Dim currenthour
Dim max,min
Dim randomno
max=3
min=1

Function getrandomno(min,max)
    Randomize
    getrandomno=(Int((max-min+1)*Rnd+min))
End Function

currenthour=Hour(Now())

if currenthour<=12 then
    randomno=getrandomno(min,max)
    Select Case randomno
        Case 1
    randomstatement="You're looking sharp today."
        Case 2
    randomstatement="Rise and shine!"
        Case Else
    randomstatement="Had your coffee yet?"
    End Select

    greeting="Good morning, "
end if

if currenthour>12 and currenthour <=18 then
    randomno=getrandomno(min,max)
    Select Case randomno
        Case 1
    randomstatement="Hard at work, I see."
        Case 2
    randomstatement="Lovely weather!"
        Case Else
    randomstatement="I love your hair."
    End Select

    greeting="Good afternoon, "
end if

if currenthour>18 then
    randomno=getrandomno(min,max)
    Select Case randomno
        Case 1
    randomstatement="Isn't it a little late?"
        Case 2
    randomstatement="Time for bed!"
        Case Else
    randomstatement="The moon's out tonight."
    End Select

    greeting="Good evening, "
end if

speech=greeting & ", Teochew Thunder."
Set VObj=CreateObject("sapi.spvoice")
VObj.Speak speech


Next, concatenate randomstatement to speech. And run your code. Multiple times. Does it say something different each time?
Dim speech,greeting,randomstatement
Dim currenthour
Dim max,min
Dim randomno
max=3
min=1

Function getrandomno(min,max)
    Randomize
    getrandomno=(Int((max-min+1)*Rnd+min))
End Function

currenthour=Hour(Now())

if currenthour<=12 then
    randomno=getrandomno(min,max)
    Select Case randomno
        Case 1
    randomstatement="You're looking sharp today."
        Case 2
    randomstatement="Rise and shine!"
        Case Else
    randomstatement="Had your coffee yet?"
    End Select

    greeting="Good morning, "
end if

if currenthour>12 and currenthour <=18 then
    randomno=getrandomno(min,max)
    Select Case randomno
        Case 1
    randomstatement="Hard at work, I see."
        Case 2
    randomstatement="Lovely weather!"
        Case Else
    randomstatement="I love your hair."
    End Select

    greeting="Good afternoon, "
end if

if currenthour>18 then
    randomno=getrandomno(min,max)
    Select Case randomno
        Case 1
    randomstatement="Isn't it a little late?"
        Case 2
    randomstatement="Time for bed!"
        Case Else
    randomstatement="The moon's out tonight."
    End Select

    greeting="Good evening, "
end if

speech=greeting & ", Teochew Thunder. " & randomstatement
Set VObj=CreateObject("sapi.spvoice")
VObj.Speak speech


OK, enough playing. Let's set it so that your computer greets you every time it starts up. Save this file to the C:\Users\[your user name here]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup directory. I'm currently using Windows 8.1 on this machine, and the startup folder may be somewhere else depending on your Windows version.

Once that's done, restart your computer and stand by!

Doesn't this code just speak to you?
T___T

Sunday 13 August 2017

James and the Giant Echo Chamber

A nod to the Roald Dah classic in the title! My year is complete.

Silicon Valley, indeed the tech industry worldwide, has been rippling recently about a certain ten-page manifesto, titled Google’s Ideological Echo Chamber, submitted internally by former Google software engineer James Damore. Former, you say? Well, apparently Damore was fired for breaching the Code of Conduct. At least, that was the reason provided, though let's face it, Google, like most other tech companies in Silicon Valley, due to "at-will employment", doesn't need a reason. Your breath stinks? You're out. My pet goldfish hates you. Pack your bags. You put pineapple on your pizza? Get away from me, you monster.

Unforgivable?

Jokes aside, let's see what the fuss is about. It's been claimed that Damore "advanced incorrect assumptions about gender" and accused his female colleagues of being "biologically unsuited to do their jobs". If you want to read the manifesto, this was what Gizmodo published - the document, minus the references and the graphs. You'd be better off viewing it here. The links and charts don't add all that much to the document, but credit where it's due, they do present a certain amount of effort on Damore's part... more than I'd have been arsed to put up anyway.

After reading choice excerpts from The Atlantic and Vox, I had a gander at the manifesto, fully expecting to be filled with righteous disgust. What I felt instead was bafflement. Look, there's quite a fair bit I didn't agree with, but frankly I think the condemnation and outrage was overkill. Oh sure, I am filled with disgust, but towards those publications rather than Damore. This is exactly what I meant when I discussed fake news back in January. Nowadays journalists seem more intent on milking our outrage for extra clicks than actually reporting the facts, and it fucking stinks. They insisted on calling it an "anti-diversity screed" which is bound to raise the hackles of even people who don't identify with crazy feminists or nutty Liberals. There is something very rotten about journalism these days, but that's not what we're discussing here today, so I'll shut up about it for now.

Instead, do look at the manifesto. Not the shit-stirring versions peddled by the likes of Recode and Gizmodo, with claims of "sexism" and "anti-diversity". The original, unaltered version that James Damore sent out. Stop letting these slimeballs tell you what to think; we're techs, not sheep. Read the damn thing, and then draw your own conclusions.

I tried really hard, but couldn't find anything about it that screamed, or even whispered anti-diversity. Damore's not going to win any literary awards anytime soon, and his arguments weren't all that convincing, but he came across as painfully earnest, and sincere.

Although, it has to be said, there were parts I found questionable. What did make sense to me, was this.
Discriminating just to increase the representation of women in tech is as misguided and biased as mandating increases for women's representation in the homeless, work-related and violent deaths, prisons, and school dropouts.

To use a cooking analogy, if there's too much salt in your soup, adding sugar will offset the taste, but it will not reduce the salt content in your soup. The end result is that you have both salt and sugar in your soup. And that you have a very unhealthy diet.

And yes. This.
As soon as we start to moralize an issue, we stop thinking about it in terms of costs and benefits, dismiss anyone that disagrees as immoral, and harshly punish those we see as villains to protect the "victims".

A company can, and should, impose ethics on its employees. That's part and parcel of professionalism. But ethics should never be confused with morals.

And finally, this. This, oh so very much.
I'm also not saying that we should restrict people to certain gender roles; I'm advocating for quite the opposite: treat people as individuals, not as just another member of their group (tribalism).

Damore's manifesto was not "anti-diversity". He was all for diversity; he merely disagreed with Google's implementation. And here, I'm inclined to agree. Engaging in discriminatory practices just to undo the results generations of similarly discriminatory practices is silly. True, lasting diversity should take place organically. Remove the obstacles for women in the tech industry, stop thinking of people as "male" or "female", and let evolution take care of the rest. Trying to force it just seems artificial. And insane.

Roots run deep

Look at the sexism and chauvinism in tech. Did any of it happen overnight? Did some group of douchey bro-grammers just wake up one morning and decide, OK, we're going to start oppressing women in tech from this day forth? Or was it a result of generations of chauvinism culminating in the mess we see today? This is so hard to uproot precisely because that tree wasn't planted yesterday. It grew from a seed and its roots have sunk in way deep. It has lasted generations, and therefore undoing it will require the same long, slow process. Change is inevitable. It cannot be hurried, it cannot be slowed. Change will proceed, like it or not, at its own pace.

As for what raised my eyebrows, take a look at this...
Women, on average, have more
  • Openness directed towards feelings and aesthetics rather than ideas. Women generally also have a stronger interest in people rather than things, relative to men (also interpreted as empathizing vs. systemizing).
    • These two differences in part explain why women relatively prefer jobs in social or artistic areas. More men may like coding because it requires systemizing and even within SWEs, comparatively more women work on front end, which deals with both people and aesthetics.
  • Extraversion expressed as gregariousness rather than assertiveness. Also, higher agreeableness.
    • This leads to women generally having a harder time negotiating salary, asking for raises, speaking up, and leading. Note that these are just average differences and there's overlap between men and women, but this is seen solely as a women's issue. This leads to exclusory programs like Stretch and swaths of men without support.
  • Neuroticism (higher anxiety, lower stress tolerance).
    • This may contribute to the higher levels of anxiety women report on Googlegeist and to the lower number of women in high stress jobs


Women generally having a harder time negotiating salary, asking for raises, speaking up, and leading? Leading? I'm not sure what kind of women Damore has been exposed to, to make such a claim. Neuroticism? Lower stress tolerance? Seriously?

That said, I'm no biologist or psychologist, thus if the actual scientific experts say so, I'm not prepared to argue. One such expert, Debra Soh, did back up Damore's statements here. However, I've also found another source that refutes them.

You know what? All this is goobledy-gook to me and I'm content to let the real scientists duke it out over this. Because whether Damore is right or wrong in his assertions isn't really the issue.

People are screaming that his manifesto reeks of sexism, but that's not quite ringing true for me. They claim that he said women are biologically unsuited for tech jobs. Now, that is a load of hogwash and anyone perpetuating such a fallacy - men and women - should be ashamed of themselves. Remember Ada Lovelace? She (yes, she) was credited for producing the first algorithm. How about America's own Grace Hopper? That goes beyond science. That's history. And bear in mind that these remarkable women accomplished what they did, back in the 1960s and earlier, way before virtue-signalling your way to "woke" Nirvana on the behalf of downtrodden women everywhere, became fashionable!

Any tech worth his salt knows who these women are. Why would Damore, who presumably was good enough to be hired by Google, ignore their contributions by claiming that women are biologically unsuited for technical jobs? That's not up for debate. Women can code as well as men - it's been historically proven.

Look at what Damore wrote, rather than what others claimed he wrote. I've underlined the relevant words.
These two differences in part explain why women relatively prefer jobs in social
or artistic areas.


More men may like coding because it requires systemizing and even within SWEs, comparatively more women work on front end, which deals with both people and aesthetics.


We always ask why we don't see women in top leadership positions, but we never ask why we see so many men in these jobs. These positions often require long, stressful hours that may not be worth it if you want a balanced and fulfilling life.


Prefer. Like. Want. All words suggesting intent and desire, rather than capability. Damore was saying that biological differences between men and women make women less inclined towards tech jobs, not unsuited for them. There's a huge frickin' difference. He's not saying that women can't do those jobs or are bad at them - he's saying that they wouldn't want to.

All Damore is saying is that preferences might account for the gender gap in tech. Has anyone ever considered that people simply prefer what they prefer? If women (or men, for that matter) don't want tech jobs, why is that such a bad thing? What, I should assume everyone should love working in tech just because I do? What rubbish is this?

The manifesto was boring, yes. Pedantic, certainly. Sexist? Offensive? Debatable. I'm not a woman and I'm not working in Silicon Valley, and I'm definitely not some hyper-sensitive Liberal itching for any excuse to be offended, so, y'know, I could be biased.

I've always been a big fan of Google's purported inclusiveness. I liked the fact that if you were good enough to work there, they wouldn't turn you away for trivialities like sexual orientation, visible tattoos, or skin color. But if they went the other way and started hiring people of various sexual orientations with tattoos and piercings regardless of their actual ability just to appear inclusive, that would be a lot less cool. In fact, it would be pretty lame.

Which leads me to my next point...

Google's political idealogy

Damore thinks that Google leans too far to the Left. Some have claimed the opposite - that Google is as Right-leaning and Capitalist as any other corporation.

I disagree with all of them. I think Google has no political ideology to speak of. Its primary concern is staying afloat, and profitable, as a company. And this whole diversity schtick is merely a smoke-screen. Google doesn't care about diversity. Or the Left. Or the Right, for that matter. But it wants - needs - to look like it does.

Why? Because it's fashionable to do so. And, as a tech company, it makes more commercial sense to appeal to the Left than the Right. Assuming that representations of Left and Right in the USA are roughly equal, the younger tech-savvy crowd are mostly from the Left. Sure, you could find young people who identify as Conservatives, but how many old computer-literate Liberals are there? No, most of the aging population are dyed-in-the-wool Conservatives who are still trying to figure out how many pages a Facebook has. And the Lifetime Value of a senior citizen customer, let's face it,  just isn't that great.

And also because (ahem!) Google is currently facing gender pay discrimination charges, since April of this year.

All that seems to point to Google needing to appear as though it values diversity. Pronto.

That would explain why they're trying to force diversity across rather than let it happen organically. Because the latter could take decades. And Google needs it to happen now. Yesterday. Instant gratification. Just like their search engine.

That would also explain why they fired James Damore, rather than simply reprimand him and/or have that open honest discussion. Because they weren't interested in a discussion, open, honest or otherwise. The direction had already been set. Get on board, or get lost. Damore's manifesto was begging for the latter.

Did James Damore deserve to be fired?

CEO Sundar Pichai released a memo that explains the decision to sack Damore, saying that "portions of the memo violate our Code of Conduct".

Rather ironically, he also notes that "The author had a right to express their views on those topics - we encourage an environment in which people can do this and it remains our policy to not take action against anyone for prompting these discussions."  In light of everything that happened, this one had me in stitches.

Sure, dude. Suuuure.

Damn, that makes me feel all warm and fuzzy inside. Who else wants some of Pichai's "encouragement" to express your views? Any takers? Maybe this is just a ploy to weed out more of those dissenting voices. Very sneaky, bro. I approve!

"The memo has clearly impacted our co-workers, some of whom are hurting and feel judged based on their gender." Sundar Pichai goes on to say, and at this point the urge to facepalm is overwhelming. You're firing somebody for hurting peoples' feelings? What the hell, Pichai? Now that's just patronizing. We're developers. We've all had to work with people we wouldn't give the time of day outside of the office. It's called professionalism - look it up!

On the basis of his opinion alone, Damore did not deserve to be fired. The kid had balls. Time will tell if he has brains to go with them. It was a difficult topic to write about without offending anyone, especially people who are traditionally eager to take offense. To his credit, Damore remained calm and took a neutral tone throughout his manifesto. The same cannot be said about some of his colleagues. A certain Jaana Dogan Tweeted "If HR does nothing in this case, I will consider leaving this company for real for the first time in five years." The Tweet was eventually removed, but its existence, however brief, unfortunately seemed to validate the less credible parts of Damore's manifesto regarding the fragile emotional state of women. In fact, it was reported here that female colleagues in Google had taken the day off because they were too upset at the contents of the manifesto to work. Is the irony lost on anyone?

That said, Google is facing some legal challenges as noted above, and the timing of this manifesto is bad publicity. If Google wishes to fire an employee for bringing the company into disrepute, I certainly don't have an argument against that. However, Damore only wrote the manifesto. He circulated it internally. Who were the miscreants who leaked it? We'll probably never know, but those are the real culprits. They leaked the email, and left Google with very few viable choices as to how to handle the situation.

On the other hand, James Damore did make a grave mistake.

Damore probably joined Google thinking that it was an open and liberated workplace, where only the strength of your skills matter. This incident has taught him the error of his ways.

Google is a company like any other, and it does what it must to survive. Google does not need to have an open and honest discussion about diversity because they don't actually care about diversity. They only care about appearing to care about diversity. Firing Damore was quick, efficient (again, just like their search engine) and threw Google's target demographic a bone. In effect, Damore effectively painted a target on himself as a convenient scapegoat for the insecurities of the Left.

He began his manifesto with
I value diversity and inclusion, am not denying that sexism exists, and don't endorse using stereotypes. When addressing the gap in representation in the population, we need to look at population level differences in distributions. If we can't have an honest discussion about this, then we can never truly solve the problem.

He was polite, respectful in tone, and practically bent over backwards trying not to say anything explicitly triggering. But did he somehow imagine that appealing to a middle ground and attempting to sound neutral would not get twisted into an outright attack on women? God, that's painfully naive. This is a sensitive issue and there can be no middle ground, no naunced position. The PC culture permeating tech is full of land mines such as the one Damore just tripped.

Watch your step.

For failing to recognize that, for his lapse in judgement, yes, Damore needs to have his ass fired. 

Effect on Google

It's tempting to say Google dropped the ball on this one, but that would only be true if I thought Google actually valued diversity and freedom of speech.

See, if Google really cared about openness, freedom of expression and diversity, they would have taken the opportunity to address this internally, and engage Damore in a civil discussion. Canning Damore only made him a martyr in the Right's ongoing war against the Left. And, let's be real here, Damore's opinion wasn't formed in a vacuum, all by his lonesome. Google can say that Damore's opinion does not reflect the culture at Google, but can they honestly say that the vast majority of their remaining employees, men and women, fully disagree with Damore? Sure, they got rid of the noisy contrarian, but he was only a symptom of a larger problem. The resentment is still brimming at Google, and no amount of forcing Affirmative Action through is going to change that. So, if Google was truly all about that openness and progressiveness, they dropped the ball big time.

But I'm firmly of the opinion that Google isn't about any of those things. This is not a criticism in any way - remember what I said about moralizing anything? Well, I ain't about to start. Google is a business, and expecting it to conform to some high-minded ideals that have nothing to do with their core business, is muddleheaded. Google is about staying profitable, period. And all that jazz about inclusiveness is a means to an end, not the end in itself. A PR gag, nothing more.

No, Google didn't drop the ball. They weren't even playing ball. Hell, they weren't even on the friggin' pitch. From that business point of view, they did the only thing they could have done. Fire the dude, appease the ravening mob - instant PR damage control.

Still, this firing probably made a lot of people uneasy, even those who disagreed with Damore's manifesto. Aren't the people who join Google usually the kind who don't enjoy censorship very much? It's Damore now, and you could probably make yourself feel better by telling yourself that the little shit had it coming. When's it your turn, next?

What's in store for Damore

James Damore has garnered a fair bit of support from the Right (what a surprise) once the powder keg exploded. He's gotten employment offers and even an official fundraiser at
WeSearchr, declaring "Now they're attacking a man for honestly, wisely, and politely expressing his opinions to his colleagues. And they've gotten him fired." (Honestly, yes. Politely, sure. Wisely? Er...)

Damore just went from being Google's PR sacrificial lamb to the cat's paw of the Rightists. This guy just can't catch a break, can he?

Whose side are you on, anyway?

You mean Left, or Right? Please. Crap like this and this just make me glad I don't work in Silicon Valley. Or the USA, for that matter. The whole lot of you are certifiably fucking insane. Batshit. All you're doing for me right now is providing a nice noisy spectacle for me to point and laugh at.

But it sure is pretty sad to see technology get perverted by political agenda. Can we just, y'know, get back to making cool stuff?

Very un-PC regards,
T___T

Monday 7 August 2017

From Shell Scrapes To Shell Scripts (Part 2/2)

I'm back! Before, we took a look at some of the things that I found applicable to working life outside of the military. In the interests of balance, let's look at some of the things that aren't applicable.

Differences

OK, it's not that these things totally aren't applicable; often it's more the case that they're not applicable to the same extent that they are to a conscript within the SAF.

Effort Counts For Very Little

Not everybody is a born soldier. Moreso for those that didn't choose to be here, but were drafted. You're going to get a huge variety of recruits - ranging from the ultra-fit, top-performing and super-patriotic types to the dysfunctional types who should never be put behind the business end of a firearm. This is not a complaint by any means, just a statement of fact. A fact that most sensible officers are conscious of. So if you were a conscript, you could get away with failure as long as it wasn't failure due to negligence or insubordination. As long as you were seen putting in a reasonable amount of effort, even if you failed miserably, your superiors wouldn't get on your case... too much. In fact, the fact that you were putting in effort despite being due to leave in a couple years' time, probably put you ahead of most conscripts who were just clocking their time and waiting, dying even, to leave.

I was a long way from being the perfect soldier. Average height, average build, perhaps just a tad physically fitter than average... but also a slow learner and a painfully clumsy fuck. (If you think being clumsy doesn't sound like such a big deal, try being clumsy on the rolling deck of a warship.) But nobody ever accused me of not trying hard enough. When I had to take over somebody's watch, nobody ever had to wake me up - I would be out of my bunk doing my 5BX and eating a bowl of cereal twenty minutes before I was due to take over. Now, I wasn't all buddy-buddy with my crew mates and some of them just didn't like me (boo fucking hoo, bitches), but everyone wanted me to be the one taking over them. Go figure.

No quarter given.

Out of the military, you're not cut as much slack. It doesn't matter how often you stay back after office hours, how many weekends you burn and how many times you go the extra mile. If you don't deliver, if you can't deliver, none of that matters. Effort is the excuse of the incompetent, and the refuge of the weak. The client doesn't care about the effort you put in, but the results. He only cares that the web application he paid for, is up and running on schedule, as promised. If you screw up, prepare to be held accountable. Nobody is going to say give the dude a break, he didn't choose to be here and he's doing the best he can. No, in a corporate environment, you damn well chose to be here - in fact, you applied for the goddamn job!

Seaman's Clothes Aren't Appropriate Corporate Wear

The crew cut and the workboots were two things I took out of the military. Having the wind rush through my scalp and the reassuring feel of thick steel caps around my toes were comforts I wasn't willing to give up, years after I left. As a result, I often looked more like a construction worker than a web developer, looked more at home in a shipyard than in an office.

And sometimes, in offices where people preferred freshly ironed shirts, pleated pants and dress shoes, I was out of place. Not that I ever got much grief for it, though people have expressed their astonishment that someone who dresses like me actually has a degree... and three diplomas.

I love boots.

I'll cop to a fair bit of arrogance on my part. Dressing the way I did was pretty much my way of declaring, I'm a no-nonsense tech - fuck your faggy dress code. Which was, in retrospect... pretty juvenile, but we're all young once.

Although, it has to be said, a lot of this depends on context. I was recently part of a start-up where the engineers wandered in day in, day out, in shorts and slippers. These days, I go with the shirts, trousers and nice shoes. Why fight it, right?

Your Superiors Don't Share Your Principles

When a rifle was put in our hands, one of the first lessons we were taught was not to point it at anyone unless we were prepared to fire - even if we were sure that the weapon wasn't loaded. This may seem meaningless to those who haven't served, but the reasoning is simple. A rifle is a weapon. An instrument of death. And it has been put in your grubby little hands. You have been charged with an awesome responsibility.

This is not a toy.

Respect the weapon. Respect yourself. Don't point it at anyone frivolously. It becomes a habit. And habits like these are insulting to those who have died from such accidents.

Your superiors understood these principles as well. You would not, for instance, catch a Colonel pointing a rifle at a recruit for fun, or ordering someone to do so for less than completely serious purposes. Every high-ranking officer was once a recruit and underwent the same training. Without exception.

Now look at the jungle that is the corporate world. Developers are pressured to abuse their skills almost constantly. Cut corners to meet deadlines. Engage in practices harmful to the product. Spend less time maintaining existing features and more time building shiny new ones, thus increasing technical debt, compromising the integrity of your project structure and exposing the product to future failure. Salespeople urging you to help falsify consolidated data. Why? Because those in authority don't understand software development. They're businessmen, not software architects. They understand time and money. They'll want to overclock the servers, overload the databases, and pay as little as possible for maintenance. The things they want you to do almost always violate some principle of software development or other.

No, it's not that I blame them. It is what it is. They're laypeople. Asking us to do stupid shit is practically part of the job description.

Finally...

While I've had the dubious privilege of digging shell scrapes, I've never written a shell script in my life... I think. Do xcopy batch files count? Still, I thought it was a clever title. Got your attention though, didn't it?

Keep soldiering on,
T___T

Saturday 5 August 2017

From Shell Scrapes To Shell Scripts (Part 1/2)

National Day for Singapore is coming up, and with it, we celebrated NS50 last month. For those not native to this land, NS50 marks the 50th anniversary of National Service, an institution of conscription for the Singapore Armed Forces. Like all able-bodied young men, I did my time some twenty years ago, and despite what some say about it (some of whom have never had to serve a day in their lives, I might add, but that's the nice thing about opinions; everyone has the right to one, relevance be damned) it was a valuable experience. Of course, your mileage may vary according to what you value.

Still, I found that the working world outside mirrored the Republic of Singapore Navy in certain ways. And in other ways... not so much. The transition from earnest combat seaman to equally earnest techie was awkward for the first couple years.

Similarities

Here are some habits I kept from my years in the military, or lessons and experiences that really prepared me for working life outside.

Chain of Command

The pecking order is reinforced strictly in the SAF, indeed, any military organization. If you have a problem, you go to the officer above you, not the officer above him. A certain Li Hongyi, son of Prime Minister Lee Hsien Loong, broke that rule famously, albeit not without consequence back in 2007, and made quite the impression.

Observe the pecking order.

In the corporate world, nobody actually gets charged or even reprimanded for breaking the Chain of Command, but there are certain unspoken boundaries. Especially among people who have completed their National Service. If anyone goes above their immediate superior's head to speak to someone higher up, they're looked upon as unprofessional. And there might be a few scornful remarks to the tune of confirm never do NS before.

Everyone, know thy place. That's the rule.

On a somewhat related note, I've kept the same attitude towards my crew mates from the Navy. You have a job to do, I respect that, and I value you as a fellow crew member. But know your place, and don't try to act like my buddy. We are not friends. I might take a bullet for you, but more in the line of duty (and probably not out of choice) and certainly not out of any personal affection. Similarly, my colleagues are not my friends, and the only way colleagues can become my friends is if they first become my ex-colleagues. This rule is non-negotiable.

The consequence, of course, was that very few people I'd worked with actually liked me - but in a heartbeat I was the first one they would choose to watch their backs.

5BX

Those were the days when we'd drag our protesting carcasses down to the Parade Square, assemble and dutifully go through what was known as 5BX - Five Basic Exercises, designed to wake us up and prepare us for the day ahead. Did I say five? Well, there were rather more exercises than that - our instructors were pretty zealous.

Basic exercises.

I've found this to be one of the most valuable habits to keep. Sure, I don't wake up at 5am in the morning (what do I look like, some kind of masochist?!) but when the alarm clock rings, 5BX does the rest. Still lying on the bed, I start off with hip raises, which prevent me from falling right back to sleep. Sit-ups are next, and they do a nice job of waking me up even further. Just enough to roll off the bed, do some push-ups, followed by squats and lunges. And if you think lunges don't sound like much, try doing them when you're not fully awake.

Don't underestimate the 5BX. These exercises don't give me that beach-ready waistline or enviable muscle definition. They just get my blood flowing and keep me limber long enough to shower, shave, change, and catch the bus.

Workplace Safety

The Republic of Singapore Navy is fanatical about work safety, probably because most of our casualties occur from not from having bloodthirsty enemies rain bullets and missiles on us, but through accidents. An embarrassing statistic for a military outfit, to say the least. Trip over some loose gear, fall into the sea and drown? Get your skull crushed by a falling object because you didn't observe that hardhat rule in the shipyard? Get crippled because someone dropped a full ammo case on your bare feet? And why the hell were your feet bare in the ammunition bay anyway?

Well, back then and even now, the higher-ups enforced a very strict culture of workplace safety, and it's stuck to this day.
Stay safe at work.

I'm generally a laid-back guy, but I've been known to chew colleagues out for moving heavy-ass servers and UPSs while wearing sandals. I also remember a couple occasions when a visibly pregnant colleague tried to access files from a top shelf by standing on a revolving chair, in front of me.

Pregnant woman. Standing on a revolving chair. In front of me! Holy motherfucking Jesus!

Look, if people want to be reckless, that's their funeral, but do it at a place I work in within my line of sight, and it becomes my responsibility to stop you. I'm being neither kind nor dutiful; I'm conditioned. Kill yourself if you must, get into all the workplace-related accidents you want. Just not on my watch, bitches. Not today. Not ever.

Next

We'll take a look at the differences!