Monthly Archives: June 2016

I read a few days ago about contagious cancer cells are spreading between different animals. This is horrific and is bound to have tremendous ramifications, even if it doesn’t spread to humans. It is even more worrying when you imagine the trend line from the cancer we all know, to the Tasmanian devil’s cancer that spread amongst a specific animal to this cancer that spread between animals

Cancer isn’t a new thing, but there is an apparent rise in the last few decades – partly thanks to bette detection but also due to our bad diet, health maintenance and environmental degradation. But I think it’s worth explore some deeper meaning of this development:

1. “Same- same, but different

If you have holding the end of long stick and wave it around then its other hand will move pretty fast – your small wiggling will be translated to big movement on the other end. So if my stick reached all the way to the moon – will its end move faster then the speed of light? Technically yes, but the amount of energy required to wiggle the stick from my end is infinite because the stick would be too heavy, so that’s not very practical. So maybe we can use a weightless laser-beam, right? Well, no, because the photon hitting one point on the moon isn’t the same photon hitting the moon a second after. And this is exactly how cancer worked up until now – if you have cancer and your neighbour have cancer – it’s very likely to come from the same source, but the sickness is still contained. Destroy the source and we’ll have peace on earth once more.

2. A cellular-level revolution

It’s important to know that cancer are body cell growing out of control, in both size and number. They might perform their original function better but very likely they won’t. Essentially the cells are revolting and deciding not participate in their designated role in the kingdom that is our body. There are several ways to handle and subdue this revolt – burn it alive with chemotherapy, starve it with special diets or even exile it with amputation.

3. The meme revolution and life itself

If we combine these two notions together, we’ll find that this cellular-level revolution is spreading. It’s gaining life of its own. Cancer isn’t an physical object. it’s a behaviour, or an idea, a meme. And now it’s copying itself from one individual to another. it’s incredible. Isn’t this how life came to be originally? From sporadic cases of amino-acid joining up together to create growing autonomous units into units that can actually reproduce and spread? Are we witnessing the birth of a new life-form? Something way different than anything we’ve ever imagined?

4. “Thank god diseases kill their hosts

One of the key factors in epidemic’s viral level and how many subjects might be infected from a single instance – is how fast the subject dies. The faster it dies – the less likely it is like to infect others. Fortunately, cancer having a relatively slow dying rate – it has zero contagious level. Millions people are sick with cancer (some don’t even know) but it’s perfectly safe to walk amongst them because you couldn’t get infected. Up until now, that is.

But what if cancer would continue its evolution, as it is actually doing now, to stop killing its hosts, as killing its host isn’t really beneficial for it. What if this different-dimension life being would simply use its living hosts to spread out, using not only people but any type of organism to spread it  control. Can we live in peace with such a life-form?  we’d be willing to host it and in return it will not cause us suffering – or better yet – improve our capabilities and lives.

I find this fascinating, but also incredibly difficult to imagine that such an entity would agree to negotiate with its hosts, just like we never thought of negotiating with the revolting cells in our bodies, which is kinda the same thing


I don’t think anyone, on either side of the debate actually imagine a prosperous future following UK’s decision to leave the EU. The whole context of the issue what the realisation that winter is coming and the question of how UK should best handle it. Rightfully or not, the majority of Brits believe they know better than the “bunch of bureaucrats in Brussel”. They don’t expect to make “Britain great again”. They just want to decide how to spend their own money; tighten their boarders against immigrations and have less intervention at their own internal affairs. Generally, those are completely legitimate reasons, if one ignores the fact that winter is coming and a united Europe stands a much better chance to survive it. Environmental issues are global issues. Refugees are an international and UK will be infamously remembered as the country that turned its back on humanity and let people die at it front door. Fine, whatever.


A small note on possible repercussions of this action – one is that the complete dissemination of the EU, leaving small countries completely undefended against global issues; and the second is much more entraining from my point-of-view – a dissemination of UK itself, as Scotland and Northern Ireland never wanted to leave the EU. Will the break apart from UK (as they previously tried) just to join independently to the EU? Do the bureaucrats in London know any better how to handle Scotland affairs?

But what I found mesmerising with the referendum is the head-to-head outcome. Almost 50% voted to remain in UK and were dismayed. This wasn’t the only election in which 50% of the voters wished a reversed result – same applies for Scotland’s referendum to leave UK, or Sweden’s decision to join the EU, or Israel recent election. Is it right? Is it ok that decision will be decided on the tip of single vote? When those who conceived the idea of election planned on it’s going to play out – is this what they had in mind?

The biggest tragedy with democracy (or republic. Same thing) is our admittance to its imperfection and yet we accept it the lesser evil – that this is best we can get. But I fear that this defeated attitude prevents us from trying to improve a broken down system, in which 50% of the people are coerced to a decision against their will.

We believe that believe that “one person equals one vote” and as all man are equals than surely more people amount to a better decision. This is essentially true, but there’s an underlying assumption that all voters are knowledgeable and care about the issue roughly the same- because as soon as they don’t – someone who knows more or care more is automatically in a better position to “buy” votes by either offering gifts and usuries to get vote from people who wouldn’t mind selling the vote for things that matter more to them. Reality shows that more than 90% of the times the candidate with most money is more likely to win. So – yes, our current political system inherently favours the rich.

Most democratic decisions are actually between two possibilities – stay in the current position or shift to a new position. So if we decide to “change” only when there’s more 2/3 of the votes – we can prevent making hasty decisions that will affect the rest of our lives. that’ll be a good start. I mean, it would have been nice to get an unanimous decision, but I wouldn’t dare subdue myself to the tyranny of stubborn, stupid and evil people. but let’s continue from this – how can we try to convince people one way or another? by answering their arguments. We might have several millions of voters but surely we’ll amount to few dozens of actually different argument why a decision should be made one way or another. Can we use technology (or better yet -our politicians. that’s they’re job after all) to gather all arguments and address them so every individual will have a clear answer why his arguments are invalid or irrelevant? I don’t expect this solve all issues, for many of our political decision are actually based on abstracts things like trust, faith and beliefs – can you trust an enemy when signing a peace treaty, for example? These are landmines that cannot be truly answered as we are not oracles – but they can be addressed, as a good solution will allow us no to rely on faith – with guarantees, for example, or to acknowledge the people’s right to different decision and down-scaling the decision – for example, a state that cannot decide regarding legality of abortions – should down-scale the decision to the local municipalities – in which in some of them it will acceptable to have abortion clinics and in others – it won’t. I’m pretty sure sure the anti-abortion activist would oppose such idea but he should be reminded that people’s right to their opinion, body and lifestyle is basic. Because this is the world we ALL want to live in.

An honorary mention to US Senate’s decision 4 days ago to reject all bills for gun control. Apparently they believe in other ways to prevent mass-shooting (or maybe they seem them as a lesser evil, compared to a hypothetical scenario they would need to fight off an evil military-industrial complex who took over their government and now sells automatic machine guns to their children. oh wait (have you ever stopped to wonder wether the thing you feat the most actually already happened?)

 Jose Saramago’s “Seeing” describes a situation in which no one votes, thus causing a breaking down of the political system. Obviously this is a fantasy story. Not only because the politicians vote themselves – but also because there’s no minimal number of votes to render an election (or referendum invalid). But maybe there should be. People who decide not to vote are making a very strong claim – “I don’t agree with any of the offers laid before me and I refuse to play a part in this farce you so arrogantly call ‘Democracy’ which works for my presumed interests”. So yes, a cap should be placed for the minimal votes that would influence the entire collective. and once we fail to reach this quota – serious questions should be asked regarding the options offered. Important to note that “not-voting” isn’t the same as “wishing to stay in the current state” as white-vote should lead to a second election – where the given option were improved and refined so more people would accept them.

In conclusion, I don’t really see BRExit as “democracy at its finest”. I doubt anyone does. I just hope the winter won’t be as bad as to justify this incredibly selfish action and one day we could discuss how democracy should work.


Not long ago I heard a story about an hotel in the far east, in which whenever a returning customer walks in, the concierge would greet him/her “Welcome back, it’s so good to see you again!”. Sure, it’s a very nice gesture to think that I actually meant something to this hotel staff and they actually care for me. Does it matter that they used a very simple trick to do that? Essentially taxi driver in that city were informed they’ll be tipped accordingly if they could engage a conversation with the customer during the ride and inquire whether s/he’s a returning customer. If so, the driver will carry the person’s luggage and place it on the left of the main door. This will give the concierge the agreed sign and s/he’ll  take it on from there.

The concierge doesn’t really remember the customer. S/he cheats. But from the customer’s point-of-view, it doesn’t matter (well, as long as the farce isn’t revealed of course).

So let’s imagine running a coffee-to-go place, called “The Little Things” that has face-identifying camera (everyone has CCTC already, nothing new in that) and it tag a name to each customer’s face when the person makes its first order. The second time the person will return the barista would greet him with cheerful “Good Morning, Phteven, would you like your usual?”. The system would quickly learn to identify a customer who likes to vary their order whenever they order around lunch, for example, but keep their morning coffee the same every day. The system would also not simply connect any barista, rather then a particular barista – because It’s kinda creepy when a stranger knows your name and your personal preferences. I would like the customer to identify the barista serving him and bond with him/her personally, just as the barista should bond with customer. Baristas should not be faceless.


The official policies of this café is that customers don’t get any special preferences. However, whenever’s possible, and that should be for the vast majority of the times, the barista would secretly provide the customer with an extra treat (for free, of course) – an extra cookie, or additional whipped cream or a coupon for free coffee on his/her next visit. If possible to inform the customer, s/he’ll do so in a whisper-amongst-friends, or just a wink, or with a personal note on the coupon or the receipt. The idea is to give the customer the impression he has a real interpersonal relationship with the barista, if not actually having such relationship.

But what happens when the farce is exposed? When the customer demands a certain benefit that exceeds the a reasonable proportion? Well, plausible deniability is always important- As mentioned above, the official rules are that no benefits should be given, but I’d hate to lie, especially in the face of the customer – but I can easily bend the truth – If employees are being entitled and encouraged to benefit their friends, yet are required not to publicly admit so; and we use technology to help the baristas become friendlier with the general corpus of customers – we can easily have a scenario in which this negligible benefit we’re providing our employees will serve to give almost every a customer a feeling of belonging as the songs goes – “Sometimes you want to go, where everybody knows your name, and they’re always glad you came”. I’d sure love to go such a place.

TL;DR, My first thought about ES6 was “but you’re just making things worse!”. I think the thumb-rule for improving a language will it be easier to learn it and not more difficult, and clearly that’s not gonna happen when you keep adding more arbitrary tools to do the same things but slightly differently (best example for this is for…of which iterate over object’s iterable elements, as oppose to for…in which iterates over all of the object’s elements.

To cut things short – JS is missing official versioning, that will allow it to purge bad code. It actually does have some  versioning, because when you add a new feature it does mean that an older browser won’t support your code and additionally, we already have “use strict”; which is actually versioning. So instead of ‘use strict’, we’ll have ‘use es6’ and everyone know how to handle it. We can later think of backward-computability to weird folks who still use IE6 by trans-piling and stuff. That’s a different story and isn’t that complicated, especially as I’m aiming mainly to clean to language and less on adding new features.

So looking at First steps with ECMAScript 6, I compiled my own remarks/suggestions of how I believe things should be done:

1. Scoping: var, let, const, IIFE and blocks

Originally {…} was suppose to be a block that contains privately-own local variable. JS screwed this up by keeping the variable to the use of the external function. I’m not sure why, but now they try to patch it up by using ‘let’. So let’s make it much more simple – {…} has its own variables that die as soon as the block ends, unless they’re being used by an internal block that outlives the original block. This is how to should have been to being with. Fixing is better than patching.

Const” my be a nice concept but when talking about pointers, which we do in 99% of the time, it’s actually meaningless.

2. Template literals = `hello ${name}!`

It’s a nice feature, but to be honest, is it really critical to be a core part of the language? I agree that the ability to write multi-line string can be incredibly useful. if we could only enforce having semi-colons at the end of commands, are code will become much more concise and everyone should know that line breaks means nothing to the compiler. And again, I don’t think template-engines are wrong – I just don’t think they should be part of a core language. Keeping them as a separate library will allow them to evolve independently. Why evolve? because we might want conditionals, loops, sub-templates and millions other things. why limit it?

3. Arrow function

Array functions are less readable. don’t. just don’t.

4. Multiple return values

Functions return a single value. It’s a mathematical thing. This single value might contain an array, or a set of values. We might want to be able to easily parse to values (talk about splat in a second), but the bottom line is that function return a single value. Trying to return weird things like { obj1, obj2 } which is actually an abbreviation of { obj1: obj1, obj2: obj2 } create syntax anomalies which in turn makes the code less readable.

reduce the anomalies! stop adding more of them! On a side note, I never really understood why typeof and instanceof cannot be simply treated as functions. or why the are different from one another. inconsistencies is what makes any language dreadful. This is something I would have like fixed.

5. For (;;) => For (…in…) => forEach(function) => for (…of…)

So For…of is just like For…on, only it’s more useful as it actually return the iterable elements of an object and not all its elements (which might include functions, for example). we’re having a zillion of loop and iterations that one cannot deny that this is a money-pit and there’s never going to be a solution that makes everyone happy. And that’s ok – but why incorporate ALL the solutions in the language? it only makes it more complicated.

why can’t we simply say that object has an iterables property, returning an array of its iterables so “for (key,value in Object.iterables(map)) {}” would iterate over ONLY the relevant items and in each iteration key will be index and value will be the iterable object itself. there. problem solved without adding a new command.

We already have Object.keys, so it shouldn’t be a problem to add Object.values and Object.iterables.

6. Parameters default values

Avoiding the need to handle default values within the code is very nice, but it leaves the devil an opportunity to introduce hell when my default value is actually a function that runs… when?

This is one complexity I think we should avoid.

7. Splat, Spread, Splat and Handling named parameters

We’d like a feature that says – “hey, all these values should actually be part of an array” and vice versa – “hey, this object is actually is a bunch of separate variables”

Here comes splat – “” which is an ok idea. so why can’t we simply have the other way around

  function myFunc (...numbers) {

  return number[2];


myFunc (1,2,3); // return 3
function myFunc (values..., ...other) {

  return (first + second + other[2]);

myFunction ({first:1, second:2}, 3,4,5) // return 8

in my example “values” doesn’t exists anywhere – it’s created and immediately breaks apart to it sub-elements.

In the current proposal “…” is actually used for both scenarios – either to collect variables and to spread them. I suggest the position will hint it action – …collect, spread… making it much more readable

It’s worth mentioning that whenever you invent a new element in a language someone is very likely to use it in a way you didn’t expect. For example, what will happen if I write source…target. well, you guessed it, it will break source to different elements and recollect back them to target.

8. Method definitions instead of function expressions in object literals to

the ability to write var obj = { myFunction () { … } } is pure laziness and breaks the consistency of the code. That’s bad.

9. Classes and Class extends

There’s ruling paradigm called “object oriented”. But javascript isn’t about it. JS is about manipulating JSON objects. JS is perfectly fine without classes. stop forcing it into something it’s not. All JS apps start small and fast but as soon as they become robust, they also become incredibly slow. So, people, please trying to make complicated JS. you’re killing our web!

Prototypical development means that whenever I get a JSON from the server I can easily apply function unto it – cat.prototype = catBehaviour. so now the cat JSON I got can cat.meow(). I don’t really need to create a new object for that. why do you insist to make thing more complicated?

I agree that the current prototype mechanism is slightly too complex but why not simply fix it?

10. From objects to Maps

Javascript’s Object suffers from having string keys. not only that but there’s an escape issue with them. so ES6 introduces a new element type just to solve the escaping issue. seriously? I’ve never bothered with that. If you go ahead and fix that (and not clear why not update the existing object) – why not have the keys as any object (you can flatten with JSON.stringify internally if you want)

11. New String and Array functions

Yes, with ES6 you can now have string.startsWith(). but, seriously who care?

you do realise that because you now decided to use this stupid function, you’ll no longer support ES5-only browsers, right?

and maybe this is what it really comes down to – Languages should have extremely long cycles – let’s say update a language every 5 years if not more, in order to give it time to propagate everywhere. Javascript is the most important language de-facto in the world today not because it’s a great language, rather than because everyone uses it. If you make it into something that not everyone uses – they’ll just keep using ES5. All those small nice-to-have function should be on external layer, or framework. Let’s call the language coreJS, and this will be scaffoldJS, and this can be easily updated, let’s say every 2 years. On top of that we can have libraries that every developer decided which to use – a reasonable update time for this should be 6 months.

js-core should be super-stable, super-consistent with itself, super-reliable, super-simple (and not super-easy) and super-fast. once we can have that, we can start talking about the external layers or silly features like startsWith or arrow functions.