Sunday, July 26, 2015

Singularly Mundane

Being singular in perspective and behaviour can be a very difficult path in a world where there is an increasing amount of ``social connections''. In some senses, it feels a little curmudgeonly in that I do not get with the times and hop on the latest bandwagon the way the many lemmings are.

You would think that having done this for a long time (i.e. all my life), it would be increasingly easier to maintain it. Unfortunately, it is not the case.

Ever since I bailed out on the Facebook, refusing to update ``my content'' on it, my digital social life has gone... mundane. I have more free time, feel less compulsive, and in general, have fewer but deeper communication channels. I used to hang out on IRC, now I'm barely there. I've since retired my MSN messenger and AIM accounts, leaving on the GTalk (or Hangouts, if you'd believe the current branding) one only.

No more drama.

Returning to blogging has heightened the sense of loneliness online, since it has always been a soapbox for me to air my views on to an invisible audience that has a high barrier towards response: blog comments are overtly more public than what the Facebook's ones are, and they need to be vetted by me via the moderation panel before they get published.

As such, hardly anyone ever comments on what I have said here or elsewhere. Hell, I'm pretty sure that my ``usual'' audience numbers no more than ten people to begin with.

Luddite-sounding babblespeak aside, I've started on yet another self-enhancement project: learn how to compose music. I had gotten some books on the subject back in 2009, but there was hardly ever any strong incentive to work through them. This time though, I am using Composing Music: A New Approach by William Russo as the source material and am using Frescobaldi with Lilypond. I was contemplating getting either Finale or even Sibelius, but I have not found anything convincing about their approach towards the composition process that justifies their rather steep price.

At this point, I don't really have anything else to talk about. I've just experienced a week where I met up with an old friend, some old colleagues, and a bunch of external meetings. In short, I feel more drained than my basic sleep deprivation might suggest. I just thought that perhaps I should write something here before I turn in for the night, as some kind of simple gesture in acknowledging that yes, this blog is getting regular updates in lieu of the near-complete silence on the Facebook.

Till the next update then.

Saturday, July 18, 2015

Lollipop

Man, that was a doozy.

I've had my Nexus 10 for a while now. I still haven't named my Nexus 10 yet, though I am veering towards calling it Eirian III. Eirian II is still going strong, and I have a tendency to take her out for a spin every month or two -- there are just some things were the E-Ink screen works better than your typical LCD display. In fact, for heavy reading (think more than 100 pages in a day), it is more comfortable to read on an E-Ink screen than a non-E-Ink one.

A pity that the Kindle DX is basically extinct, and that Amazon isn't really going to resurrect the larger form factor, deferring instead towards a high resolution (200+ ppi) displays in a 6-inch form factor, a format that I feel is quite useless for A4/letter-sized PDFs.

Anyway, my Nexus 10 shipped with Android 4.2 ``Jelly Bean'', and at the time of purchase the CyanogenMod version wasn't ready for it. And so I had been running the stock Android image for as long as I can remember.

My biggest beef with the stock Android image is that there is just so little... control that is available, without rooting the device. I don't trust Big Corp to have my interests as a priority, and thus prefer that anything that I paid money for should have the option of allowing me full control over it -- I am willing to take on the responsibility of undoing any damage done by my own stupidity, as long as I had the power to enact all the control that I care to give. In particular, I am very annoyed at the advertising.

Advertising is the bane of all things relating to the web. On the one hand, it sounds like a fair trade to provide ``free'' content at the expense of a few advertisements, but on the other hand, advertisers tend to cross the gray area of what is acceptable by either being more intrusive, or even downright misleading. I blame this on a couple of factors, namely the laziness of web site owners in managing their own advertising, and the negative side of the ``network effect''.

Most advertisements on web sites do not come from the web site owners themselves, they are instead delivered from one of many ad-networks, farms of servers whose operators act as a type of aggregation point for anyone who wants to run an advertisement. This... market arises naturally due to the cumulative heft of such ad-networks in fulfilling the two requirements of a successful advertising platform -- largest reach for those who want to advertise and a single point of contact and out-sourced management for those who want to have advertising dollars to support their sites.

Initially, I was neutral with respect to advertising on the web. Then it started to get obnoxious. Bandwidth was wasted in running large payloads of advertisements instead of the content that one was looking for, then the increasingly shady practices of the ad-networks allowing malware and downright unethical methods of gaining those click-throughs proliferated. Basically, ad-networks have turned from a somewhat tolerable nuisance to an unwanted harassment.

On the desktop, it is easy to mitigate these. Web browsers have various plugins that aid in blocking access to these ad-networks, which have the dual benefit of making pages load faster and saving of precious bandwidth particularly on those with quotas on them (think mobile internet or dial-up).

But the phone, or technically, the smart phone -- it is hard to use such tools. For one, actual control is hard to get at for such locked down devices. Android may be open source, but once the environment is ``live'', it is hard to impossible to enact controls on the fly. For two, much of the ads are found within the applications themselves, and by decree there cannot exist tools that publicly block ad-networks system-wide. Couple that with the misleading display graphics of the ads in question, it is a no brainer that the phone environment is particularly susceptible to bad ad-networks, especially since their user interface is error prone to begin with -- it is easy to ``slip'' and click the wrong damn button.

So what has this got to do with the ability to root? The answer is this file: /system/etc/hosts. That's a file that the underlying DNS look up libraries respect to obtain the equivalent IP addresses for a given domain name provided. With the proper set up, it is possible to hijack the domain name of the ad-network and redirect it to nothing, thus stopping the access of the ad-network at the lowest level of the OSI layers. This means that we have a system-wide (though crude) way of eliminating those pesky ad-networks.

CyanogenMod provides such powers on the get-go, and that's the reason why my Galaxy Nexus phone runs that instead of stock. But the Nexus 10, well, as you can tell from the link, development for it is sort of... slow to non-existent. So, I just load in the latest and greatest factory images (Lollipop 5.1.1 at writing) instead and root that instead and use the new root powers to load up a custom hosts file that will prevent access to the ad-networks' machines.

There is, however, a catch.

Unlike CyanogenMod, the stock factory images are very stingy in setting up the system partition -- there is literally no space for the 500kiB needed to load the custom hosts file. The way in which I discovered how to workaround that is something that I probably won't write about here. The principle though, is rather simple -- make space by deleting files already in system.

And so now, my Nexus 10 is running Android 5.1.1, somewhat secured from the dastardly ad-networks, complete with the obligatory screenshot:

I don't think I have anything else to write about now. Till the next update, I suppose?

Sunday, July 12, 2015

Negative, Positive

Recently I was told that I ``sound too negative on my blog'', or rather, I have a tendency to be all ranty and what-not instead of being thankful for the good things that have happened to me.

Honestly, that observation is correct. I do not have a legitimate reason to be pissy at life, with all things considered. I am gainfully employed, am happily attached with long-term plans of settling down, have interesting hobbies that I haven't really gotten bored with yet, and am generally contented with what life has thrown at me thus far.

But no one wants to read about how great someone else's life is! If anyone wanted to read that kind of drivel, it's probably better to look at Facebook and its ilk, where almost everyone self-selects their positive experiences in life to showcase to others.

That is, for those of you who haven't realised by now, the reason why I don't want to use the Facebook. Too phoney. Life isn't a bed of roses, but Facebook and other ``social media'' stuff skews the representation to the point where the ugly aspects of one-upmanship becomes the dominant factor, even if people aren't actively trying to outdo each other.

Actually, in the early days of the Facebook, people tend to be a bit more candid, showing a bit more of their ``other sides'' in a more personable sort of way, you know, the way a friend in the real world might share with others. Then it got opened up to the general public, and HR professionals start to apply the guilt by association fallacy and scan through all ``public'' information of their candidates, which led to a feedback loop where the whole sanitisation process/self-censorship process takes place, which in turn leads to the current behavior of only showing what is good in one's life.

So... in the bid to encourage people to put more of their information out there, we end up with people putting out only their most positive front. Maybe that's a backfire right there. Heheheheheh...

Anyway, yes, I have a tendency to not talk about the good things that happen to me. There are two reasons why, one more rational, the other more irrational.

The rational way of looking at it comes from a quote from Tolstoy in Anna Karenina:
All happy families are alike; each unhappy family is unhappy in its own way.
No, this isn't an academic blog, so I'm not going to go all out MLA/APA and cite sources. Suffice to say, what this means in context is that talking about good things is just plain boring -- the set of good things that can happen to someone is the same, while that of the not-so-good is very different.

The irrational way of looking at it is that I don't want to jinx myself.

I'll leave it as that for now. Till the next update.

Wednesday, July 08, 2015

Hub, Spokes, SLAs

Unless you are living not in SIN city, by now you ought to have heard of the massive MRT failure along the North-South and East-West lines. More interestingly, you ought to have heard on the chaos surrounding the eventual dispersal of all the commuters who were stranded by the failed mass rapid transit.

This post isn't about who's to blame in that incident, nor even about speculations relating to that incident. I will use this incident as an analogy for system architecture design.

There are many different strategies in architecting a system, most of which depends on the nature of the system being developed. For example, if security is of paramount importance, then a hub-spoke strategy is used, with the server (or more often, a cluster of servers) sit in the hub, and everything else (the clients) connect as spokes to the hub. If the ability to ``self-heal'' is more important, then some kind of peer-to-peer based strategy is used.

There are of course more strategies to be used, and I will not go through them. I just want to point out something interesting. The public infrastructure in SIN city is designed around the concept of the hub-spoke strategy, where for the most part people are expected to make use of the mass rapid transits to cross the large distances (it's SIN city, so 40km or 25mi is considered ``far'') before switching to a bus or two for the proverbial last mile. This is the reason why there are many new MRT line constructions over the past fifteen years, political conspiracies aside.

There is a catch that is amply demonstrated through last evening's disruption. If you are using a hub-spoke model for architecting a system, the hub cannot afford to fail at all. Maybe I'm not saying this loud enough: THE HUB CANNOT AFFORD TO FAIL AT ALL. It is the innate risk behind this particular means of architecting. Since all traffic passes through the hub at some point, any downtime of the hub means massive damage to the system at large. As shown in last evening's debacle, the failure of the two biggest routes in the network was enough to cause a spillover of commuters that lasted too long for comfort.

Thus, the effective use of a hub-spoke model for system architecting will imply that one has in place a solid proactive maintenance plan for the hub to avoid any downtime whatsoever. This is where we find those triple-9 (< 8.75hr downtime/year) and quad-9 (< 52min downtime/year) service level agreements (SLA).

Now that has got me wondering what the SLA is for the running of the MRT lines in SIN city...

Monday, July 06, 2015

Call Me Annoyed

Call me annoyed.

I really dislike waking up and feeling completely out of it, the exact thing that I felt this morning when I rolled out of my metaphorical bed (I don't actually sleep on a bed). My head was woozy, my nose was bunged up, the entire works of an impending cold short of a throat infection of some sort.

The temptation to see the doctor to get instant relief is high, but I feel uncomfortable with the fact that I had been seeing the doctor at a near regular rate of once per week. All for the same stupid thing.

I cannot understand my susceptibility to colds and upper respiratory infections. It's ludicrous actually. I know that I have some allergic rhinitis going on which is controlled with the steroid nasal spray (Nasonex), but ever so often I will get hit with a head cold with an ĂĽber bunged up nose and a general wooziness in the brain itself.

Perhaps it is time to re-examine the vitamin C hypothesis again.

It has been a rather long time since I last took vitamin C supplements consistently. And during this time period of lull, I think that the cold incidence is a tad higher. However, this is merely an anecdotal observation -- I haven't actually tallied up the number of incidences of the cold during any time period. Medically, there is some light evidence that vitamin C can help prevent the cold, but only in the specific situation of active training under stressful conditions. Perhaps the heat stresses on the body from this rather annoyingly warm ``summer'' can be considered the necessary stressful conditions and all the Aikido training (and perhaps even the venerable 5BX that I had been loathing to do) can be considered under the aegis of ``training''. Which, of course, translates to me taking more vitamin C supplements.

Well, what harm can it do, right? As long as I don't overdose myself and keep within the LD50 of vitamin C (~12g/kg body mass using the rat model), there isn't any harm to be had.

Mundane vagaries of this sort aside, I have been reading on and off various threads on Reddit, and the kind the really gets my goat are those that involve the education system (``schools'') and bullies. As a general rule of thumb, Reddit has a predominantly American bias in terms of the user-submitted content, and on the topic of schools and bullies, it holds true as well. The sad thing of the US system is that of ``zero tolerance'' policies, or as I'd like to call it, the ``let's throw out common sense and judgement in favour of enforcing regularity and uniformity on everyone to avoid lawsuits'' policies. It makes me glad that I have no intention of raising my young in the US.

The prototypal story follows this general template: Alice is a student at a school, and Bob is a bully who keeps picking on her. One day, Alice got too pissed off at Bob and snaps, flailing/fighting/hurting Bob. Then, they both get detention and Alice is told to ``take the blows, not defend herself, and to look for a teacher''. Rinse and repeat unless things get nasty enough that someone gets sent to the ER or when a parent gets pissed of enough to have a showdown with the school administrators.

There are so many things wrong with that picture. The most damning is the dictum of never fighting back and appealling to authority. The problem isn't with the instruction, but lies within the context in which the instruction is provided. ``Appealling to authority'' works only if the said authority is just and even-handed, both of which are neigh impossible to get in the context of the school. Teachers and school administrators have, at best, a primitive notion of what being just means. The varying quality of the teachers is the reason why ``zero tolerance'' policies come about -- in the bid to enforce uniformity (aka Standard Operating Procedures or SOP), the judgement abilities of the teachers are taken out of the equation, making the rules rigid and unfair. Much of the action occurs after the damage is done, with everyone attempting to assign blame after the fact -- there is hardly any incentive for any teacher to actively step in to break up an altercation due to the lawsuit-happy environment.

I don't think Singapore has reached that level of stupidity. But then again, we tend not to have such blatant cases of bullying thanks to the full-scale indoctrination of proper social behaviour (or rather, conformity) that we don't find in the US.

Here's what I think. Violence should not be tolerated as a society -- there are always non-violent means of achieving a goal. It is laudable that schools try to inculcate that value into the young. It is also good to hear child psychologists praise the superior method of talking with one's children as the primary means of discipline, to get them to understand that something they have done is wrong.

However, violence cannot be eradicated completely from human society -- it ought to be allowed, with heavy penalties exacted on those who choose to use them. The reasons for this are pragmatic -- non-violent means of achieving goals assumes an innate intelligence and sentience that befits the status of homo, but there are times where the... person one is talking to refuses to use his/her intelligence and understanding to see the point being discussed. It is at such exasperating times that violence ought to be permitted. That said, there has to be a price for the application of violence, and the person needs to make a judgement on whether the objective is worth the price to pay for the violence enacted.

Back to the bully situation. The primary psychology behind a bully is an extrinsic source of superiority to mask the innate inferiority complex -- a sign of an immature mind, to put it in the bluntest terms. While it is possible for the intellectually advanced to bully others, in the context of the school, that is hardly the case. All the appeals to authority in the world will do little for the victim; but one violent outburst at the bully will make it clear that there is a price to pay for the bully to continue bullying. It's a primal way of settling problems, and I do not claim to agree with it completely, but it is a pragmatic solution of desperation.

That's how modern diplomacy works anyway. Heh.