Sep 142015

The refugee—or migrant, depending on the news outlet—crisis is currently the top story for both the Middle-East and Europe. The interest and concern seems to have shifted from the civilian war in Syria, and the rise of ISIS, to the humanitarian concerns of those arriving at the shores and borders of European nations. And yet there are real dangers that are being neglected as the world is preoccupied with the crisis.

Germany has suspended the Dublin Regulation (which requires refugees to register at the first EU country of entry, and to return to it upon illegally crossing borders to another country,) late August as Hungary was overburdened by asylum applications. The suspension of the Dublin Regulation encouraged many to attempt traveling directly to German soil, at least 40% of which weren’t Syrian. At the current rate, Germany expects to receive 800,000 asylum applications by the end of 2015.

Throughout 2014 and early 2015 there was another major thread in the media, however, that, judging by the headlines, was disconcerting. “Europeans are flocking to the war in Syria. What happens when they come home?” asked the Washington Post in January 2014. “Europe braces for potential threat of returned Syrian war veterans” wrote Al Jazeera in July the same year.

Earlier this year Reuters wrote that according to the head of Europol “the continent was facing its greatest security threat in more than a decade, with as many as 5,000 Europeans who have joined fighting in Syria posing a risk to their homelands.”

A quick survey of the reputable news outlets shows that a growing number of Europeans had been “flocking” to Syria to partake in a gruesome conflict that claimed the lives of at least 220,000 and possibly up to 310,000, displaced an estimated 7.6 million, with almost four million refugees who fled to other countries. These fighters, if they survive their venture, will have gained training, exposure to extremist ideology, contacts into a global network, and battle-hardening. Upon their return to their unsuspecting homelands, they would have everything necessary to organize and undertake anything from recruiting and training to acts of extreme violence.

Things would have not been nearly as bad, had the conflict been among sworn enemies without ulterior motives elsewhere. Unfortunately, that is not the case. ISIS—the brutal group that has overtaken most of Syria, and parts of northern Iraq and Libya, destroying minority-villages and town, pillaging and raping women and preteen girls, and even selling them into slavery—have been openly hostile towards Europe and the West, with multiple journalist hostages, some savagely slain on camera. A document revealed in February of this year that they would use the Libyan ports currently under their control to “flood the north African state with militiamen from Syria and Iraq, who will then sail across the Mediterranean posing as migrants on people trafficking vessels,” according to the Telegraph. In hindsight, this should come as no surprise, considering the recruiting machine that ISIS employs to convert and recruit even those with unrelated heritage to their cause.

However, thanks to the overwhelming numbers already arriving in Europe and Germany’s open-door policy, the terrorist groups does not need to go to such length. As the world embraces to help those in need, as they escape to safety, ISIS gets a free pass, without checks, without questions; it only needs to send as many willing to cross the distance and pay the people-smugglers the right price, and many who have volunteered to fight and die would no doubt migrate to Europe. The fact that by far most of those crossing borders into Europe are young, single, males doesn’t make it easier, as that is the category that needs the most scrutiny (compared to families and children).

Presumably the concerns of Europol and other security services was that returning Europeans would pass through security with ease, thanks to their European passports. With the current situation, at least Syrians will get a priority to enter Europe, and many others who claim to have no documents, making it virtually trivial for countless extremists to cross the borders and go underground.

Did the European leaders forget about those threats of returning fighters that we’ve been reading about for at least the past 18 months? Is the barbarity of ISIS tamed by the generosity and hospitality of Europeans? And why has the media—presumably the force that keeps governments and politicians in check—gave up on asking the tough questions, such as how will known and potential terrorists be stopped before entry, while helping the refugees in need?

The political winds are changing in the wrong direction, something that will benefit the malignant extremists immediately, with far reaching long-term consequences that are hard to asses, let alone control. Meanwhile, the media seems to have given up on its primary job and, instead of demanding plans and regulations from policymakers that safeguards the lives of civilians and the security of the world, they are engaged in self-congratulatory frenzy on the collective generosity of Europe.

When the media returns to the question of Syrian fighters in Europe, will there be a chance to contain the danger, or will it be to report the uncovering of an attack, or worse?

Mar 282015

Whatever you make of self-help, and whether you take this to constitute a form of it or not, I here present the top-most three means that I found over the years to get productive. I believe they are the simplest, yet most effective, of all methods to be productive and efficient. But do not limit yourself to any, this offers but good start.

Productivity is certainly relative. For our purposes a wide-enough definition would be an accomplishment what one needs, or has, to meet. That is, a task.

Self-help is an oxymoron of a special sort. It wants the benefactor, who is typically the customer of the self-help guru selling books, seminars, and workshops, to believe that they can help themselves. Assuming for the moment that one could help herself, it’s harder to imagine her doing so through seeking help from another. Perhaps self-confidence and empowerment are the first methods in the self-help industry’s repertoire.

While I don’t subscribe to the self-help movement, nor think it effective, I do believe advice borne of hard-earned experience can help the inexperienced and seasoned alike. My bookshelf betrays my bias against self-help and motivational material, which exceeds my bias against fiction and is only diminished by my bias against cargo cults. With this in mind, and with much reluctance, did I put to words these three points.

TL;DR: Read the headings and jump to the conclusion. (Bonus, read the intro.)


One of the potent forces that underline anxiety and worry is lack of control. Control is an umbrella word that spans many aspects. We don’t have control over the things we don’t understand or comprehend. We also don’t have control over what we can’t change. Put together they make for an explosive force that drain motivation and energy. Complex tasks are notorious for being opaque and out of reach. In addition, they don’t give us clues as to where to start.

As we procrastinate and put off complex task, that often turn out to not to be nearly as hard or complex as we had thought, we lose valuable time. The impending and nearing deadline reminds us the magnitude of the task which, in turn, makes the deadline too close to be realistic. This vicious cycle is hard to break without actually getting to work.

Once we have an understanding of what we’re up against, what we need to accomplish, and where to start, we have gained — some — mastery over it. We have control. Anxiety, too, is more controlled. We feel confident not just because we’re familiar with the task and how to handle it, but we are also in a much better position to deal with uncertainty and surprises. In fact, this feeling of control and calm is so potent that it resembles the warmth we feel when the wind on a cold day winds down for a minute or two. It feels like we’re no longer cold, and relax. Forgetting that it’s still cold and the wind is bound to pick up. Don’t let the reward of breaking down tasks, planning, and organizing, as important as they are, substitute real progress on the tasks themselves. Remember that controlling anxiety is an overhead, the task still misses all the effort we ought to put into it.

No project or situation is ideal, of course, nor do all plans pan out as expected. This fuels the anxiety and gives more reason to put off tasks until past the eleventh hour, when we are guaranteed to fail. This three-point approach deals with both anxiety and procrastination by claiming control and managing tasks in a friendly way. It doesn’t try to change our habits of limiting leisure time, rather it paces the time we spend on productive tasks. It helps us understand what we have to accomplish and make us think about the steps towards that. Finally, it gives us valuable feedback to improve our future planning and to rectify biased impressions about what we spend our time on.

Ⅰ. Make a List

The first major step is the one that goes the furthest in helping us get a job done; enumerating it. By creating a list, we have to go through the mental process of identifying the steps necessary to get to our goal. This process of enumeration is, it turns out, one of the biggest hurdles in getting something done.

Before we start working on any task that we feel burdened by, we need to put it in perspective. I often find myself procrastinating and avoiding tasks that a few years ago would have been incomparably daunting, such as shopping for some hardware. I put it off longer than necessary, even though all I have to do is just browse a few candidates online, read a few reviews and compare prices and features, before hitting the magical button that will render a box at my doorstep a mere few days later. The fact that I listed what I have to do, ironically, makes the task sound as simple as it really is. But we all know how often we put off similarly simple tasks. Calling a friend, sending an email, working out, reading that book you’ve always meant to read but somehow it was uninviting, and so on with many cases.

Making a list achieves two things. First, it forces us to go through the mental process of visualizing what we have to do. This is a major effort in and of itself for more than one reason. Neuroscience tells us that by imagining or thinking about an act, our brain fires what is called mirror neurons. These neurons fire essentially exactly as when we actually carry out the act itself. Imagining a physical workout fires the neurons that would activate when we physically do the workout. This is what induces cringing when we hear about a painful incident, cry when we hear of a loss, and pull our limbs in when we see or hear of someone in harm’s way. By going through what we would have to do to get the task at hand accomplished, we literally make our brain go through it without any physical consequence. A simulation or virtual reality version of things.

The second advantage to making lists is the breakdown. Most non-trivial tasks involve multiple steps. These steps in their turn can sometimes be split into further sub-tasks or steps. This process of simplification of course is welcome. We can then avoid the large upfront cost of working on the task in one sitting or shot, which might end up taking too much time or just wasting quality time that could otherwise go into other important tasks.

I probably wouldn’t like wasting a beautiful weekend browsing online shops, say, to replace my router; it’s just too much work, at the expense of wasting an otherwise perfectly serviceable weekend, for something that isn’t nearly rewarding or fun. However, I can search for reviews of best routers of the year and quickly go through them for an initial survey of the market landscape. In another sitting, I can look up these top models on my preferred online shop to get a better picture of what buyers think and what the prices are like. In a separate sitting I can compare the features of the top 3-5 models that I think are within my budget and meet my needs. By this stage I should be almost ready to checkout and place an order. Having split the cost over a number of sittings I have gained a number of advantages. First, it wouldn’t feel like a major undertaking. Second, and more importantly, I would have much more time to think about my options. This latter point is hard to overestimate in importance. Our subconscious brain is very good at processing complex situations at a very low cost. When we consciously think about a problem we devote virtually all of our attention and focus to it. This is very costly and with limited time doesn’t yield nearly as good decisions as one would hope. Delegating to the subconscious, or “sleeping over” a decision as it’s often called, gives us valuable time to process by changing the processing faculty, which is almost like getting a second opinion of sorts.

But does sending an email really need a list? While it doesn’t necessarily have multiple parts to it to be broken down in a list, we still need to place it as a task among others that we have to do. Putting it in context makes it easier for us to see the work ahead of us and prioritize before getting busy. Another advantage is that we don’t have to send the email in a single sitting. If it’s an important email (or like this post, an elaborate one,) we probably need to treat it as a writing task. Then we can outline the main points in a sitting, flesh it out in another, and revise and polish it in a third, before we finally hit the send button.

Finally, if there are unknown steps, or the order of tasks is not clear, do not worry. Just add to the list what you think is necessary or probable to be done. Add comments to your notes so you can return to them as more information becomes available. Invariably, as we progress through a multi-stepped task, the more we learn about it and the better we understand what actions need be taken to accomplish it. Feel free to split tasks, replace them, or combine them; it’s all part of the process of organization and planning. The list will make these uncertain steps much more transparent and manageable.

Ⅱ. Limit it

One of the things that make us dread a task is the feeling of wasting quality time on something unrewarding. We’d rather watch that movie, browse the net for entertainment, play a game, etc. than to do the laundry, read a book, get some work done, or file our tax forms. The difference between these two groups is primarily their pleasure rewards. While it’s important to have clean cloths and get tax paperwork done, they are necessities that we would happily do away with if we could. The rewards they bring forth are the avoidance of negative repercussion. In comparison, playing a game or watching a movie have positive rewards and the negative repercussions, such as postponing cleaning the dishes, are minimal or could be easily justified.

Incidentally, the tasks with positive rewards are typically not called productive. This probably owes to the fact that such activity is best labelled play rather than work. At any rate, for our purposes, watching movies could also be a task, which is especially true if one is in the review business. It is up to us to decide what is a task and what isn’t, not society. But we should be conscious of the two competing groups, as there will always be tasks that we prefer to do at the expense of the one that we need, or have, to do. Procrastination is to find excuses to do the former rather than the latter.

A solution to this mental hurdle is to limit the time we are willing to spend on the more important, but less rewarding, tasks. This is in contrast to limiting the time we spend between productive tasks. It might seem more reasonable to limit the time we spend on entertainment rather than on productive tasks, but that only gives us an excuse to put entertainment first and procrastinate our way through the day.

It’s far more effective to cut a deal, so to speak, with ourselves. Spend no more than 20 to 30 minutes on the task at hand and then do anything of your choosing for another limited period. The only requirement is to prevent any distraction during those 25 minutes or so, including checking email, answering phone calls, checking your social network etc. Put your best into those few minutes and get as much done on the task. Once the time is up, switch gear to anything you like. Repeat.

This approach is often called Pomodoro after the tomato-shaped timer. Limiting time works because it puts an upper limit to our time investment and gives us something to look forward to. Once we are fully engaged with the task at hand, we might find it easier to finish it even if we overrun our time limit than to break out of the zone and be forced to start over. Because the cost of getting in and out of a zone, where we are most productive, is rather high, we avoid distractions that we might naively think instantaneous and therefore we could multitask on. A quick email check might take a second or two, but when we see a new email we can’t avoid reading the subject line, which makes us think about the sender, the topic, and what it might contain. At this point we’re practically out of our zone and have forgotten what we were doing. Going back to our task might take us a good several minutes to pick up where we’ve left of, often because we can’t remember where we had gotten and have to waste valuable time finding the exact point of departure.

This is not unlike what happens when interrupted while reading (if we don’t mark it immediately, that is). We lose track of not only the last thing we read (often the sentence is interrupted midway,) but more importantly where we were in the text. Marking the text on the screen is easier than in a printed book or even on a reader (and please, please, don’t dog ear any book — you are almost never its last reader). I’m often surprised by how off the mark I am when guessing where I was in the text when I try to resume, even when knowing the page. Like the legendary boiling frog unaware of the predicament, we too progress through a task in small increments that, like the water heating up the frog, feels seamless and continuous. We don’t notice where we are unless we step back and compare a previous stage to the current. Interruptions force us to repeat a number of steps or, worse, to jump ahead and, after wasting some more time, realize that we have skipped too ahead prematurely and promptly have to backtrack. This process is often repeated multiple times until we are back to the same mental state where we had been interrupted, only after wasting valuable time.

Ⅲ. Time it

Humans are notoriously bad at guessing and estimating. We are especially bad because of the illusion that we can pinpoint the value, duration, measure etc. of anything familiar to us. If you doubt this, try to guess the height of colleagues or friends whose heights you don’t know, but have met countless times. Write down your estimates and then ask them to measure and compare notes. Worse still is when you try to sort the heights of people you’re thoroughly familiar with. You soon realize how hard it is just to place them in relative order to one another, which should be vastly easier than putting a number on their height or weight. Try the same with virtually anything and you’ll see how short you fall from the mark. Of course we aren’t equally bad at all estimations, some are harder than others. The point is that if you were to say how much time you spent on emailing, surfing, chatting, etc. you’d find out that you aren’t accurate at all, that is, after you’ve timed these activities.

By timing how long we spend on different activities we get a more accurate picture of the costs of each activity. This enables us to better prioritize and manage them. It might feel that doing the laundry takes forever, but in reality it probably takes a comparable time to, if not less than, checking Facebook or Reddit. Even though the latter feels like a quick five-minute task, the reality is that we probably spend dozens of minutes at a stretch with no commitment for more than a few minutes. Laundry, on the other hand is certainly tedious and menial, but more probably than not limited in duration. Where the internet is open-ended and can end up taking us into its endless labyrinths and to bizarre corners, laundry, by comparison, can hardly vary much at all. Understandably, the latter’s monotony is the source of its being boring and the former’s open-endedness its source of intrigue and excitement.

By tracking the time we spent on different activities, even if imprecise and by means of checking the time before and after and mentally assessing the difference, the relative feel of how big each task is will change. I know it will take me a good 4 hours to assemble a brand-new computer from its boxed parts to getting to my mailbox, precisely because I’ve kept track every time I had to do it. Although it is a fun activity, I know by the end of it I’d be as tired as at the end of a long workday. Similarly, I know I spend far more time on email than it felt like before measuring. This made me think of ways to reduce this time. One solution that was very productive was to minimize both the number of times I hit reply and the length of my response.


There is no shortage of task management software or sites. But one doesn’t need anything fancy. In most cases one doesn’t need more than a simple editable list (a.k.a. a text editor, or a notepad,) and a timer. I’ve avoided making suggestions for software or sites because the research is part of the learning curve (but don’t procrastinate on it). It’s also best to find the tool one is best comfortable with. I will say thought that I’ve often used sticky notes and text editors to track daily tasks. They are as effective as the more complex project management tools, especially for short-term or daily tasks.

The above three points are as simple as one can get in terms of organization. Before you start a day’s work, go through the top things you need to accomplish and write them down. You can prioritize quickly if that is easy or given. Break down the more complex tasks into sub-tasks that you can accomplish in a stretch of 20 minutes or so. Tackle them one by one in Pomodoro sittings and keep track of how much time they are actually taking. Be conscious of distractions and make notes of them, preferably next to the tasks.

By planning, knowing where one is going, controlling the effort, and monitoring progress, we are as organized and methodical as we can be, with minimal overhead.

Try it out, and share your experience.

Dec 222014


Tianhe-2 by Jack Dongarra


The semi-annual Top500 list shows a rather worrying trend for the 4th consecutive time in its last incarnation of Nov 2014. The list just hit its “lowest turnover rate in two decades.” The combined performance of the Top500 systems went from 274 Pflops to 309 Pflops in six months. The annual performance growth sits at ~23% at the moment, down from historic 90% per annum (measured between 1994-2008).

What this means is that there is practically no change in the Top500 most powerful computers in the world, and the trend is picking up speed in the wrong direction.
There are certainly cycles as technology and economies go through booms and busts, yet it seems there has never been this long a slowdown since 1993 when the list was first published.
There is only one new entry in the top-10 (in last place) with 3.58 Pflops from the US. To see the slope of the slowdown, here is a graph from the presentation.

There is reason to think the trend will reverse, eventually, but the best estimates point to the 2016-2018 period. That the trend can be traced to mid-2008 hints at the economic downturn as a cause. However, there is also reason to think competition has cooled off, or possibly technology is the bottleneck. This is support by the fact that a significant application area is government/military/classified, which aren’t nearly as sensitive to economic downturns as the scientific establishment. Technology is in the middle of a boom in terms of co-procs/embedded-proc as a new class of computers, so it’s hard to chalk this off as a technology bottleneck. If competition is to blame, it’s a mystery to me as to why this should be the case now, especially that US-China are more overtly in competition than ever before, at 46% and 12% entries respectively. Russia, with 2% of the Top500 entries, is at one of its lowest points in terms of relationship with Europe and the west since the cold war, and is implicated in a hot-war.

Supercomputing Performance Development - Copyright

Supercomputing Performance Development and Stagnation

It should be mentioned that the US and Asia have lost a few percent points each in terms of entries since June last (Japan, the only exception, gained 2 entries) and Europe gained a few, surpassing China in raw power after being taken over two years ago. Perhaps the budgets and plans that reflect the political climate hasn’t yet materialized in terms of supercomputing power. It’s interesting to see how this will play out, as it’s a disturbing trend, one that has implications in terms of technology, science research, and a long history of healthy—and mischievous—competition between nations to simulate weather and destruction—both natural and man-made.

The presentation slides show the slowdown with all the glory and color of graphs and numbers.


The only relatively—good news is that the second most efficient system went from 3418 Mflops/Watt to a new record of 4272 Mflops/Watt since June last, improving on the top contender at 3459 Mflops/Watt by 23.5%.
In fact, there are five updated entries in the top-10 most efficient systems, four of which are new. Personally I find this exciting and encouraging, but without more raw power many applications can’t be improved further.

The Green500 list, which is similar to Top500 in that it tracks the world’s most power-efficient systems, as opposed to the most compute-capable ones, has more good news. The latest edition, which is published after Top500’s latest, lists two machines that are more power-efficient than the LX that holds the top entry in the Top500’s power-efficiency list. At 5271 Mflop/Watt, the L-CSC at the GSI Helmholtz Center in Germany improves on the LX by yet another 23.5%.

L-CSC at GSI, Copyright Thomas Ernsting from


To put this in perspective, the most efficient consumer GPUs hit 23 Gflops (for AMD) and 28 Glops (for Nvidia). However, these are the numbers for single-precision (32-bit) floating-point ops, not the “full-precision” required by the Linpack, which requires 64-bits or more. The double-precision GPU performance is 1/4th the single-precision, at best. Typically it’s 1/8th or less. For AMD the most efficient double-precision GPU will reach 5.5 Gflops and 7.2 Gflops for Nvidia, which aren’t the most efficient single-precision GPUs (GPUs are differentiated for different markets, so they don’t compete with themselves). Meaning that even the most efficient consumer GPUs hardly makes the cut on their own, without any overhead or even a motherboard and CPU. The L-CSC uses Intel Ivy-Bridge CPUs and AMD FirePro Workstation GPUs to achieve the efficiency record.


The above record performance if scaled to 1 Exaflops would require a mere 190 MW energy. While this is still significant, it is the closest we’ve come to the DARPA target of 67 MW (by 2020).
Whether the architecture of the L-CSC scales to Exaflops or not is a different matter altogether, but the energy efficiency question which hitherto has been the most formidable obstacle to reaching Exa-scale performance seems to be well within reach. Still, 67 MW is a rather optimistic target as it would require a 2.8x efficiency improvement over the current numbers. Nonetheless, in 2007, when plans for Exa-scale supercomputing was laid out, the technology of the day would require 3000 MW when scaled to Exa-flops. There has been, in effect, a net 15x efficiency improvement in the past 7 years (no doubt in major part due to co-proc technology).

On a related note, at least the US seems to have plans to pushing the envelope towards Exa-scale computing, according to a very recent announcement. The US gov. plans “to spend $325m on two new supercomputers, and a further $100m on technology development, to put the USA back on the road to Exascale computing.” The $100m is especially exciting news as it’s not going to a vendor for building or upgrading a supercomputer, rather it’s allocated for technology. Beyond that, this should give a decent push for the healthy competitive spirit to start rolling again.

How to Use a Million Cores?

There has been a significant research and interest in parallel algorithms and libraries in the past decade—in major part—precisely to address the issue of scalability. Most implementation of algorithms do not scale to tens or hundreds of cores (let alone thousands or millions,) even if in theory the algorithm itself is reasonably easy to parallelize. The world’s fastest single machine (by a margin of 2x from the next competitor,) the Chinese Tianhe-2, a.k.a. Milkyway-2, has 3.12 million cores to play with.

The main issue has to do with communication. But in the parallelizing algorithms, the major problem is even closer to raw computing—overheads. It seems that the biggest bottleneck to parallelizing efficiently on even the same socket is the overhead of partitioning, scatter, and gather. The last step of which typically is the killer.(Interesting presentation on scalability with HPX and more published papers here.) I’ve been following some of the libraries and compilers in the C++ world and HPX as well as TBB seem to be doing a very decent and promising job. HPX is especially promising and is well worth taking a look into as it’s C++ standards conformant and even has a good chance of getting some of its functionality into the standards body by 2017 (the next planned C++ standard voting meeting). In addition, it supports distributing across compute nodes. Like TBB, it’s OSS.

But the shorter answer is that these machines are designed for specific applications and typically have the software available, so there is a very good idea as to what hardware characteristics will deliver the best performance, both computational and power consumption. In addition, they run multiple parallel versions, or scenarios, concurrently that are independent of one another, which reduces scalability issues dramatically. This is actually a good thing for simulations as some, if not most, scenarios are discarded anyway, and the sooner one discovers their unfitness the better. I do not have the reference at hand at the moment, unfortunately, but I believe the record for scaling on the most cores was reached sometime back (circa 2013) with 1 million cores utilized towards solving a single problem, which is impressive by any measure.

Often the supercomputer is shared between users. The US Titan, the second fastest machine, has thousands of users and applications running on it. To that end the Lustre filesystem (based on ZFS) was practically created for it. With 40 PB storage and 1.4 TB/s throughput _on disk_, it’s not exactly a standard-issue I/O system. (This presentation on Lustre shows the performance achieved on Titan.) This means that Linpack numbers should be taken with a large grain of salt when comparing these behemoths.

Why Supercompute?

I’m perhaps as cynical as anyone about the utility of these beasts of a machine and I’ve pointed out the military use of these machines, which is unfortunate. However, I much rather have the testing of nuclear (and other WMD) done in virtual simulations on machines that push the state of the art and most likely trickle the technology down to civilian and commercial use, than to have them done by actually blowing up parts of our planet. Indeed, it was precisely the ban on nuclear arms testing that first pushed the tests literally underground (the French and the US are the best known examples of covertly resuming tests underground and in the oceans,) before ultimately going fully into simulation. As such, I’m not at all torn on my position when it comes to the use of supercomputers for military purposes, considering the aggressive nature of homo-sapiens (irony noted in the lack of wisdom when playing with WMDs) and the fact that there is beneficial side-effects to this alternative.

Now, if only we could run conflicts through simulations to avoid the shedding of blood, much like how territorial animals display their prowess by war screams and showing their fangs to avoid physical conflict, and walk away when the winner is obvious to both, I think the world would be a vastly better place. Alas, something tells me we do like getting physical for its own sake, often when there is absolutely nothing of significance to gain, and much too much to lose. Nobody said pride was a virtue without a cost.

Mar 102014

Cryptocurrency could’ve remained a theoretical exercise if it weren’t for the mysterious Satoshi Nakamoto, who was outed by Newsweek this week. The man allegedly behind Bitcoin had “a career shrouded in secrecy, having done classified work for major corporations and the U.S. military.” Whatever that means, and whether or not the face that has been linked with the name is the correct one, Bitcoin took a rather peculiar and big cat out of the bag.

Whatever you happen to think of the inventor, or inventors, of Bitcoin, which started a something of a revolution in economics similar to what the internet did to a couple of decades ago to information and publishing, and whatever you think of Bitcoin as an alternative currency, I hope to show that digital currency as a technology is separate and distinct from the economy and process of producing it. Let me state clearly from the outset that I don’t find digital currency as harmful as-such, rather that Bitcoin and the other breed of clones are extremely inefficient and wasteful. They could achieve, I argue, the same goals by being far more useful and valuable to society at large.


We can agree that Bitcoin started something that will be hard to stop, if not impossible. This to me speaks of a demand for what Bitcoin has to offer. While some governments and media outlets tend to put the emphasis on illegal use of digital currencies, technically savvy users see it as efficient way of transferring funds, other users see it as a means to be independent from centralized power and a perfect candidate for a global currency. The efficiency of transferring digital currencies comes from lower transaction fees, but mostly because transferring them are done electronically and not physically. Anonymity, which is only partial, is also a highly sought trait in trade as it gives a sense of security and reduced risk, whether real or perceived.

The Other Side of the Coin

My objection to Bitcoin is not in the technology, nor its use. Put simply, everything has a cost, and the cost of the current crop of cryptocurrencies is rather high to society at large. I’m certainly not the first to notice this inefficiency and some tried to find ways to recoup the cost.

Those of us who have been planning on buying new video cards, a.k.a. GPU, are bitterly aware of the disproportionately high prices of the last generation of AMD cards. Back in December when these Radeon were in obvious shortage Litecoin mining was blamed. AMD improved its supplies of the highly demanded cards, but prices remain high. Eventually miners too had take note too.

There are many other uses to a GPU, besides the obvious mining and gaming, not least scientific and medical research, computer aided simulation, modeling and for finding drugs to cure deadly diseases among other promising and necessary projects. It is this latter group that is harmed by the high prices. And those were only the GPU-intensive projects. At this point CPUs are too slow to cost less in electricity than the potential coin value they mine, but of the projects that could use those CPU cycles are climate simulation and prediction, mind modeling, protein docking, and solar panel optimization to produce clean energy. And I’m leaving out many other HIV, cancer and other drug research projects.

To add insult to injury, not only is the high price of GPUs is reducing the potential number of participants on projects that have a chance of improving human life and prosperity, but they also don’t produce anything that benefits anyone other than the miner.


But that’s not all. Cryptocurrency mining is a double whammy. The energy spent mining is energy wasted. On an individual level one might think there isn’t much difference between playing a game and mining. After all both use the same GPU and will consume the same electricity (per unit time,) which the owner is happy to pay for. However, unlike gaming, or more useful activities as mentioned above, mining has no entertainment value, doesn’t pay game developers that produce the games, doesn’t help us socialize as multiplayer games do, and do not have any hope of teaching us any skills that games might be argued to do. While I may lust over a multi-GPU gaming rig someone spent thousands to ramp up their frame-rate to run folding and similar projects on them when not playing, serious miners run farms of such rigs 24/7 to create money out of whatever their local power-station consumes to supply them with the juice that runs their cutting edge machines.

This isn’t unlike getting paid to produce soot. Or to pay power-stations to produce soot for you. Certainly we can do better and reverse the state of affair on its head: instead of burning away to mine coins, we can solve useful problems to mine coins. After all, digital coins are an arbitrary currency, and as I’ll show below, as long as we can secure it from attackers, what how many coins the work miner do produce and of what value a coin is, are completely up to us.

Before going further, let me state my point as clearly and tersely as I can: Regardless of how our personal ventures are paid for, there are very few investments that can rival the return on investment in scientific and medical research that will benefit the next generation, if not us directly, and we could still have digital currencies.

Economics 101

Traditional economics works by creating “value.” Suppose you have $100 million that you aren’t using at the moment. You can lend it to someone who has an idea for a project. They can do two types of things with it from an economics perspective: one possibility is to spend it all on hiring people to dig the biggest man-made ditch in the middle of nowhere, or, they can pay research centers that work on finding a new technology or a cure for a deadly disease. Of course there are countless other choices, and they don’t come in two colors either, they could use the money to build the next Google or Apple and create innovative products and millions of jobs. The point is that of all possible ventures and shades of black, there are those that go nowhere and do no good to anyone (except perhaps for feeding the workers and their families for the duration of the project, or until they commit suicide) and those that continue to serve most of society long after the project is over.

Any sound economic system should provide an incentive to the individual such that—to paraphrase Adam Smith—through self-interest participants inadvertently do more good to society by seeking to maximize personal gains. In my example above, the lender will be a fool for parting with his or her hard-earned money before first doing due diligence on how the funds will be spent. Yet, if everyone hoards their income and never lend out, society will need to constantly create more and more goods from some source that doesn’t require initial investment to match the growing demand. Clearly an unsustainable proposition. It is therefore in our interest to invest in fruitful projects. But, as I tried to show through my caricature of an example, the investment should pay us, both investors and society at large, more than it spends. Otherwise, eventually the economic cycle will slow down and come to a halt. This is exactly what happens in recession: investors lose confidence that they will get back their investments, so stop lending out.

If we could playback time and be in a position where we had a chance to invest in electronics in the ’50s and ’60s, to ultimately discover the transistor and then integrated circuits which made all of modern electronics, and not least computers, possible, such an investment would clearly have benefited investors and society. Similarly, if Dr. Jonas Salk had asked me for donations to buy equipment or even pay himself and his staff salary for his work on the polio vaccine, no awards will be given to me if instead I had decided to buy ice-cream to school children with the money, albeit arguably a reasonably good cause.

Granted, my examples are flawed: We don’t know in advance that Dr. Salk will succeed in producing vaccination for a disease that still stands without cure to-date and had infected as much as 350,000 children a year in 1988. In reality there would be many others working on similar vaccines and cures than just the one we know was successful post-factum. However, and this is my point, donating to any one of the researchers would be a much better long term investment to the very same children who received my free ice-cream.

Bitcoin Economics

To go back to digital currencies and economics, suppose I offer you 50c for smoking a cigarette. If you’re already a smoker, you might just ignore my joke or bother to take my money. If you’re not a smoker, I’m sure my offer will not convince you to start smoking. However if I were to make the offer indefinite, even a non-smoker might be tempted to do the math and find out that if they smoke 30 a day, they can make almost $5500 annually for the effort of a few minutes a day, and that can go even higher the more they smoke. I’m fairly certain that this offer, whether it comes from cigarette producers who are willing to pay for promotional purposes or otherwise, will have had a resonance as recent as a few decades ago when the harms of smoking were still unknown, if something very similar hasn’t been attempted already, which wouldn’t surprise me personally. In fact we should expect many people in poor conditions, who are either ignorant of the harms of smoking, or think it’s a lost cause to preserve their vanishing health anyway, might be tempted to take the offer.

Bitcoin does something very similar although in a different way. The offer is the following: participants in Bitcoin mining are rewarded for doing some work with a unique string of bits that they can use to trade with someone who’s willing to accept it in return of something of value, including goods, services, and of course cash. The inventor of Bitcoin made it easier to do said work than to counterfeit the “coins” (which are really just long numbers). (This is very important because if I were to offer you some product (or banknote) that people fake easily, you should immediately realize that you will have a hard time getting back what you paid for the original when everyone pays less for the fake.)

Unlike an employer, Bitcoin isn’t offering a work which has a purpose that is beyond our comprehension or need-to-know. The work Bitcoin is offering the reward for is completely arbitrary and, I argue, harmful to everyone, both participants and bystanders. Essentially, Bitcoin, and all cryptocurrencies to date, are offering a reward for finding a certain color and shaped grain of sand in the desert. They have designated sand hills to mine and the total number of said grains to be discovered. The value of the each grain is determined by the market and demand. And apparently there is a significant demand for them in markets that either want to be independent of the current monetary system, or, they like the efficiency of passing the grains around, once they find or buy them that is.

500 volunteers shoveling to move a dune in Lima from its original position.

500 volunteers shoveling to move a dune in Lima from its original position.

Once all the special grains have been discovered, the sand hills will be abandoned and all the trucks and shovels and all the work of digging, sieving and moving the sand will be forgotten. (This isn’t strictly accurate, as transaction fees will still make it lucrative for miners to continue validating and keeping a ledger of all transactions even when there are no new coins to discover.) But the energy and productivity lost to other more useful projects will be forever gone. What will linger along with the coins mined will be the long-term effects of burning so much electrical energy and building specialized hardware that, with the exception of general purpose GPUs and CPUs, have little or no use for much else than mining coins.

One response I got from a cryptocurrency aficionado was that it’s no different from mining for gold. It’s true that similarities between the two are abound, and I wholeheartedly agree that mining for gold can be similarly wasteful, but gold is a scarce metal that has numerous applications and uses beyond being used for monetary exchange and jewelry. rightly calls it the most useful metal. Gold is used in the CPU and RAM that power your computer and in solar panels that produce electricity from sunlight. They are used in medicine and in industry and to make the reflective layer of early and high-end CDs. This is by no means an exhaustive list, but digital coins have nothing to offer in any of those applications anymore than they could be used in the successor of Hubble, the James Webb space telescope‘s mirror, or as a lubricant in space vehicles. Nor could they be used in surgical equipment.The monetary value of gold may be arbitrary from one point of view, but its value as a metal should never be underestimated.

In fairness, the shortcomings of Bitcoin I criticism are not not unexpected. After all it’s the first digital currency. Nonetheless, we should be aware of them and their real cost as more and more of the general public partake.

Mining: A Crash Course

As the the pool of miners explodes at an exponential rate, the majority is bound to be casual people who are no more interested in understanding how coins are really mined than the majority understands where and how money is created in the physical world. But here we are interested in going further.

Any currency, physical or digital, has some key properties to secure before having any chance of becoming sustainable as a legal tender. In the physical world control of over amounts in circulation, ownership and prevention of counterfeiting are done in centralized fashions. First, the central bank or an equivalent legal entity is given the monopoly right to print and issue banknotes. (There was a time when banknotes were handwritten IOUs that promised a payout to the holder issued by any “bank.” It was with the advent of permanent banknotes and central banks that this transformed into the current standardized single-currency per state form.) Second, transactions perform by an intermediary banks are managed by said banks such that one cannot double-spend or transfer funds from a fictive account and illegally increase their stash. These two institutions, central banks and commercial banks, are centralized. Centralization is an Achilles’ heel to any alternative currency because it can be controlled and shutdown easily, whether by legal means or by Denial of Service attacks. Distributed currencies on the other hand are immune to this, but at the expense of complexity.

The main issue in distributed systems is that because no single entity controls the ownership and total amount in circulation, there is distrust and the risk of hostile take-over by a rough party. To protect against such attacks, Bitcoin has a validation and voting mechanism built in. This is where the latency in validating transactions comes from. Before a transaction is complete, first a certain minimum number of other miners must confirm it. In Bitcoin the minimum number of confirmation is calculated to be six, which puts the difficulty of double-spending (i.e. spending the already transferred funds for a second time,) computationally unfeasible.

But how do you find coins in the first place? This is the interesting part as it is both intertwined with the confirmation process above as well as the mentioned problem of counterfeiting. Because of its distributed nature, the information that your bank holds secret must be available in public. Otherwise, where should it be if not in a central place, which we established isn’t desirable? Therefore, all transactions as well as wallet balances are also public information. What isn’t public is the identity of the wallet owners. But the network of transactions that they had committed and the wallets at each end of every transaction are also known. So one can trace the full history of all available coins and transactions and the balance of every single wallet are all public information. Now to create new coins, a miner has to do two things: First, it find the longest valid chain of transactions that it receives from other miners (remember that there are potential attackers who are sending out invalid transaction chains to essentially steal coins,) thus choosing the hardest chain to fake by an attacker (this is the confirmation stage). Second, they start finding a new block by simply finding a random number, such that: SHA256(last_hash + random) < last_hash

This formula a simplified, but the principle is preserved. The SHA256 is a function that takes a sting of bytes of arbitrary length and returns a fixed-length bytes (a long number really). The last_hash is also the result of an SHA256, and it is the hash generated by the last miner in the chain. Miners repeatedly call SHA256 on the new combination that they generate based on the random number (called nonce) and typically count the leading zeros of the resulting hash. If a certain number of zeros are found, then their work is complete and they send it to other miners in the network, which do exactly as we did when we received the block chain. Because we include the resulting hash and the random nonce that we used in the new block, they are able to repeat the same operation and check the result. The key here is in the difficulty in finding a random value and a resulting hash that when ran through SHA256 matches.

If someone else had beaten us to finding a nonce that fits the requirement, we will have to discard our work thus far on the block, check their block and once confirmed, we add their block to the chain and start the above process of mining on their block. Whoever finds a block by the above process is awarded a certain number of coins (typically 50 coins, which are halved at certain intervals). And because the blocks include all the information necessary to know who is who (by unique numbers that are as hard to forge as finding blocks,) and how much they have, all the information is shared in the pool and available to everyone. Thereby forging and faking becomes near impossible.

It’s worth mentioning that if an attacker controls more than half the mining nodes in the pool, they will be able to send out fake block chains that will allow them to double-spend their coins, because their voting power will basically be more than anyone else’s.

As it’s clear, the process of mining is arbitrary and the difficulty of producing coins is only to give strong guarantees that forging will be simply practically impossible. In fact, SHA256 is computed twice to make it even less likely that someone will find a trick or a way to reduce the amount of work they have to do to find a hash. This is like asking someone to throw a coin until they get, say, 500 heads in a row, but with the difference in that they can’t claim they have without actually having to do it, thanks to the cryptographic security of the SHA256 function.

A Better Digital Currency

Digital currencies certainly have their merits and we shouldn’t dismiss them out of hand. The current crop are the first and the technology is still young. They rely heavily on cryptography, whence they get their name, not least because cryptography is well-developed and understood. We know how to create secure messages that are very easy to create and validate but exceeding hard to break or fake. These are exactly the properties one want to have in any distributed monetary system. It is why banknotes are only minted by governments and they use state of the art printing technology to make counterfeiting expensive if not impossibly hard. But there is no reason why we should move sand hills that do little more than waste a lot of valuable resources all for the arbitrary coins that presumed to be in demand and therefore of value.


There are other problems that are very hard to solve, but checking the answer is easy. These problems are known as NP-Hard and the more hardcore subset which are called NP-Complete. These are the hardest problems that exist, in computational terms. To give just one example of type of problems that could be used as a mining proof of work, optimizing the distance the electrical wires have to run in a computer, or the wires, piping etc in a city belong to a group of optimization problems that can’t be solved in a reasonable time except for the most trivial cases. Finding the shortest paths of wiring in a CPU will probably take longer than the universe exists even if all the computer in the world combined their power to solve it. Given a path, it’s trivial to add up the total length and see if it’s shorter than the shortest know or not. In currency system that is built around optimizing such a problem, those who have shorter paths will fetch more value than those with longer ones. There will be an economy, much like memorabilia collectors, where common items have a certain range of prices and highly-sought items that are known to exist have last-seen-price and then there are speculative items that is said to be worth a certain amount if it exists. When such a rare item (or path in our case) is put for sale, the market will decide its value. Alternatively, the first to improve on the previous record broadcasts their results and once validated by more people than any other solution, their block chain becomes dominant and all other blocks with inferior solutions are discarded. Finding the lowest energy protein folding secondary and tertiary structures is another similar problem.

There are many problems that are attention worthy and some of them are known to be very promising in deed. Digital currency could be the perfect catalyst to motivate people to donate more and more of their time and resources towards these goals while generating real value for them in digital coins. These aren’t new ideas by any means, and some have already made attempts at them. Some were pipe dreams, while others might have started in earnest.

May 032013

I was probably never going cross paths with or hear about the five-year-old boy who shot his two-year-old sister dead, nor any of her parents. Odds are, most people on the planet wouldn’t know about them had it not been for the story that hit the news.

Unbeknownst to me, I had gotten in an argument with a pro-gun who hid his affection rather well, all the while I thought we were having a casual conversation.  As tragic as this is, and as a parent I can identify with the grief of losing a child. But I cannot feel sad any more than I can understand what a parent must feel knowing it wasn’t an accident out of their control, rather it was precisely a consequence of their upbringing. “No, it’s sad. It’s very sad.” I was told. To me sad is that nearly 9 million child dies every single year of malnutrition and other trivially-curable complications or diseases, I answered. “You aren’t sad for the 9 million dying children?”

No, I’m not sad. You know what Stalin said? He said, ‘a single death is sad, millions dead is a statistic.

Yes, that was the response I got.

And before I knew it, I got the argument for guns: Cars kill more people than guns, but you don’t want to ban cars, do you?

Before we get too worked up, let’s separate these two points: Emotions developed on hearing stories of unknown individuals, as tragic as they may be, is one thing, not having good arguments to defend a position and instead repeating bad arguments is a completely different matter.

Hume Rolls in his Grave

Kentucky State Police Trooper, Billy Gregory, said “in this part of the country, it’s not uncommon for a five-year-old to have a gun or for a parent to pass one down to their kid.” Regardless of whether I am pro gun or not, I must recognize one thing: Guns are dangerous.

“Passing down” guns to a five-year-old inherently and inevitably implies taking a certain risk. The risk of the gun going off, whether intentionally or accidentally. Failing to recognize this simple fact is akin to covering one’s face when losing control of their car. There might be multiple ways to resolve a problem, but ignoring it couldn’t be one of them.

If I start drinking and gambling, I shouldn’t expect anyone to be surprised when I lose everything and end up on the streets. I shouldn’t expect anyone to feel sad for my stupidity and bad choices. They might as well laugh at my surprise at the outcome. If I hand my twelve-year-old the car keys, should I or anyone else find it odd when they crash the car and damage people and property? Should I expect pity from others if the car crashes into my house damaging and injuring me?  Similarly, guns and children do not produce an infinite output of combinations: there are very few things that we should expect to happen from the marriage and we only hope it’s going to be playground fun. But hoping is no precaution.

I find it borderline humorous that people systematically give their children guns and then the whole world is gaping at the death of a child. I find it inevitable, unless steps are taken to prevent it. Like everyone else, I have limited energy, both emotionally and otherwise, and I prefer to spend them on preventable causes that affect countless more children, equally fragile, equally lovable and equally rightful to life.

Just because we find it easier to write off millions of deaths to statistics doesn’t make it right. I’m sure Stalin had other apt utterance worthy of quoting in the light of the massacres, deportations and cold-blood killings that he sanctioned. But should we take comfort in the coldness of the indifference that we may feel at the death of millions of children who, like the victim in this case, haven’t yet seen their fifth birthday? Does Stalin’s ludicrous indifference have any bearing on how one feels or should feel?

Stalin’s quote was at once shocking and baffling to me. I didn’t know if using it was an excuse and justification for one’s feelings, or lack thereof, or it was a Freudian slip. Either way, just because something is doesn’t imply what it ought to be, morally speaking. Perhaps we should start feeling sad about these children of have-not parents. The children dying of famine have only nature and our inaction to blame. The five-year-old who killed his sister, in contrast, has his parents to blame for preferring to buy him a gun (or at least allowing him to own one) instead of a multitude other things they could have done, not least buying him a book to read and learn from in the hope of bettering himself and his society.

I cannot feel sad for the decisions of others, any more than I can prevent them from taking these decisions. However the same couldn’t be said of the children dying of malnutrition and lack of clean water. In the later case I can prevent it, and my (collectively our, really) inaction to save a single more child is sad indeed.

At least in one sense he was right, though. We cannot begin to imagine anything in the millions, but a single child with a picture in the news is readily reachable. But that only speaks of our limitations of being human, and hopefully not of our inhumanity.

Guns and Cars

I have heard many decent arguments for crazy things, including keeping slaves and leaving women out of the workforce (and typically in the kitchen) among others. Here “decent” doesn’t mean acceptable or justifiable, rather that the point in an of itself having a merit. They fail because taken in the full context of the issue, a single argument for or against something as complex as these topics doesn’t simply have enough weight.

Slavery had many benefits to slaves, not least steady income, job security and living space. And at least some women will not mind if given half a chance to be relieved of the burden of providing for oneself and their family entails. Women aren’t unique in wishing for an easier lifestyle than working forty-hour-weeks.

But these arguments fail to resolve the issue one way or the other because they are incomplete. They shed light on a single aspect and it’s a very narrow one at that as well. Cars do kill people, perhaps much more people than guns (clearly here we are ignoring wars). I’ve read numbers as high as 500,000 annual deaths from car accidents.

Do I want to ban cars for this huge loss that they cause? Yes, and in a sense we do already. The traffic and car licensing laws have evolved in response to both the dangers that are inherent in driving and the exploding number of cars and motorists. Driving under the influence of alcohol (given a certain allowance, if at all) is a grave offense in many states and countries and can be a felony if others are injured. Multiple offenses typically result in revoking the license and often sentencing to jail.

More importantly, the argument is weak and irrelevant because it appeals to one’s disposition, bias and shortcomings of undermining the perils of cars. Indeed, many of us cringe upon hearing about spiders and snakes, let alone seeing one, but may jaywalk in heavy traffic, sometimes with children.

We should avoid driving whenever we can and we should have better laws, education, responsible drivers and car owners as well as better traffic rules to minimize their risks. But we should also do the same for guns. Giving them to kids should simply be an offense no less sever than letting a minor drive your car. Having a gun gifted to a child, by maker called “My first rifle,” and then pretending that the gun will be locked in a safe is simply avoiding to see things for what they are. Children are attached to their toys and I guess that’s the point of manufacturing guns for them in the first place – they are expected to become loyal gun owners for many more years.

All this pretending that guns have benefits to society on equal footing to cars to justify their risks. I am not willing to give such a blank license to cars and will demand improving the situation to avoid unnecessary injury and loss of life from car accidents. But the onus for proving the benefits of guns to be even remotely comparable to those of cars is certainly not on me. Let alone the benefit of guns to kids.

When someone kills another with their car, they cannot claim that injury is a risk we’ve come to accept, so why prosecute them anymore than a gun owner can claim the same. But let’s not pretend that owning guns is a right without restrictions, because being responsible is all about restrictions, first to oneself before others.

We will never take responsibility if we don’t see the inherent dangers of our choices and if we don’t understand that both car and gun deaths are preventable and they are both of our choosing, and as long as we view our actions vicariously.

Evidently, the grandmother of the now-dead two-year-old has a different understanding of cause and effect than mind. “It was God’s will. It was her time to go, I guess, I just know she’s in heaven right now and I know she’s in good hands with the Lord.” She said.

I feel sorry for the five-year-old for having the parents he has, and I can only hope he will not repeat the same mistakes when the roles are reversed.

Apr 202013

I just got my Raspberry Pi a couple of weeks ago from Newark/Element14. First impressions are great!

All I needed was an SD card and the HDMI cable that came with the TV set. Downloaded “wheezy” and placed on the SD card. Hooked my favorite toy, the “remote control” (a.k.a. Logitech K400) and I had a complete system with little effort. I hooked a mini USB cable from the Pi to the TV to power it. Flawless first boot.

Out of the box it has everything essential, including web browsers, Python Idle and a Scratch – a puzzle-like game development platform that the kids love. Hooking a Cat5 to the router and internet. Apt-getting mplayer and Gnash (open flash player). Video is unusable without the hardware acceleration, which requires license fees to enable the codecs, though. However internet radio is very much within reach. Depending on the bitrate and codec, it uses anywhere between 25% to 75% of CPU cycles. Oh, and I had to get the stream IP from the .pls files on shoutcast, but that’s trivial to wrap in a script that wget, sed and spawns mplayer.

As a toy, experimentation lab/playground, Swiss Army knife embedded system, or educational platform, it’s very hard to beat. At $25 for model A and $35 for model B, it does more than it costs.

I couldn’t be happier with exchanging my hard earned cash with the Pi, so you can imagine my surprise when I got a call from Newark to ask about the feedback on the delivery and my order  (both of which were fantastic) and was asked if I minded that if they sent me a discount code on my mail. To top it off, I was encouraged to share them with you.

Here is a snippet of the thank-you email:

Thank you for your most recent order! We appreciate your business and as a thank you we would like to extend to you a 15% off voucher. The Voucher code is THANKS1C and it can be used as many times as you would like through April 30th, 2013. After May 1st, use code THANKS2 which is good through June 1st 2013. Feel free to share with whomever you would like.  When placing an order over our website, please type in the voucher code on the shopping cart page. If you are ordering by phone, simply give the code to the representative processing your order. There are lots of ways to take advantage of this limited offer from our award winning website  to our knowledgeable and friendly team waiting to take your call at 1 800 463 9275. You may also send your quote to or email a purchase order to

THANKS1C (through April 30th, 2013)

THANKS2 (from May 1st through June 1st 2013)


Discount applies to the first price-break quantities only. Discount cannot be combined with other offers, promotions, quantity discounts, or contract pricing. Contractual considerations with a small number of manufactures may reduce or prevent a voucher discount on selected items including test equipment; Cannot be used on Raspberry PI. call us with questions relating to voucher exclusions. Non-catalog items are not subject to a voucher discount.

It’s reasonable that the discount doesn’t apply to the Pi, considering that it’s a non-profit and sold at cost price. So, share them, use them and hope you give Raspberry Pi a spin and let me hear your thoughts. It’s well worth it.

Apr 082013

Apparently there is an ongoing war between FEMEN, a feminist organization that protests topless, and a group calling themselves Muslim Women Against Femen, among others.

What is of interest to me is the rhetoric and politics at play. FEMEN is not exactly known for taking the diplomatic road to getting their voice across. Whatever their methods, whether one agrees with them or not, or whether they are effective, considering that so far they got huge backlash and won controversy more than anything, the response is certainly interesting.

The row ignited when Amina Tyler, a 19-year-old FEMEN activist, posted topless pictures of herself on FEMEN-Tunesia’s Facebook page with “Fuck your morals” in English and “My body is my own, not anyone’s honor” in Arabic. A certain preacher called Adel Almi was quoted by Tunisian newspaper Kapitalis that she deserves 80 to a 100 lashes according to the sharia law, but added that due to the gravity of her actions, which he believed may encourage other women to do the same and bring an “epidemic” and “catastrophes,” merits death by stoning.

FEMEN has reacted by protesting, as any feminist human should do. A photo of a man apparently kicking a topless FEMEN member protesting in front of the Great Mosque of Paris was posted in a piece on The Guardian‘s Comment is Free section. A video of that protest, with the man in question, is available on Vimeo.

Muslim Women Against Femen has responded with an open letter with eight-point objections of Muslimahs (Muslim women) to FEMEN. In addition, a number of women (including a child) have posted their photos on Facebook holding slogans to the same effect and interviews with supporters on The Huffington Post.

What is amazing is that between the preacher, Muslim Women Against Femen, and the women with the slogans, not a single reference is made to the young woman responsible for the debate in the first place. Amina Tyler is missing from the picture and there is good reason to fear for her life.

The Muslimahs who took to themselves the right and initiation to defend their rights and religion, some of whom are self-identified feminists, apparently forgot to do Tyler even a lip-service to denounce any harm that could be inflicted on her. Instead, they took the opportunity to first generalize and speak for all “Muslim women, women of colour and women from the Global South,” as if appointed spokespersons. Second, the opportunity to lash at “racist, imperialist, capitalist, white-supremacist, colonialists” was not missed, never mind that they are irrelevant.

Some of the slogans in the self-photos read “Do I look oppressed?” and a child of perhaps five held one that read “Shame on ‘FEMEN’ Hijab is my right!” I do not see anyone taking anyone’s rights from them, if anything the rights of Amina are the ones at risk. Least of all the rights of a child, which, I should add, beyond their welfare, health and education they can barely demand any rights that adults don’t give them. Which raises the question of who, if not her parents, gave her the “right” to wear a hijab when she clearly is in no position to choose to wear one anymore than the blue-jeans that she has on. Besides, if these women are not oppressed, they need not answer to the calling. (Although I do wonder if that will remain to be the case if and when they decide to change their outfit.)

The open-letter doesn’t offer any more wisdom from the thirteen or so university students who wrote it. Rife with ignorant accusations, misguided rhetoric, contradictions and ad-hominem attack on the protesters. If they are to be believed, “FEMEN is a colonial, racist rubbish disguised as “women’s liberation”,” and “rubbing shoulders with far-right, racist and Islamophobic groups is just ANTI-FEMINIST beyond bounds” and “EXTREMELY DANGEROUS.” And members of FEMEN “don’t really care about violence and harm being inflicted upon women, you only care about that when it is perpetrated by brown men with long beards who pray five times a day.” Which is quite interesting considering that the group had focused most of its activity to protest against “sex tourists, religious institutions, international marriage agencies, sexism and other social, national and international topics.” In fact, had the authors check their facts they would have run into FEMEN’s four-point goals on their MySpace page explicitly targets “Ukrainian women” and “Ukraine” explicitly. Not to mention that if anything Ukraine was a victim of -Russian- colonialism. (But I guess all “white” people are “racist” and “colonialist.”)

Completely oblivious to the irony that it was a Muslim (male) preacher who called for the lashing and stoning of Amina Tyler, the authors declare “we don’t have to conform to your customs of protest to emancipate ourselves. Our religion does that for us already, thank you very much.”

In a particularly off-topic and a below-the-belt swing, the epistle writers pulled a punch on the physique of the topless protesters saying that “not all of us are white, skinny, physically non-disabled [sic] and willing to whip off our tops merely for press attention.” Perhaps alluding to both being white and skinny as undesirable attributes in women (by who?). To add insult to injury, they advised them to “check yourselves before you go into the streets again.”

Perhaps of the more salient remark is that the authors “understand that it’s really hard for a lot of you white colonial ‘feminists’ to believe, but- SHOCKER! – Muslim women and women of colour can come with their own autonomy, and fight back as well!” The takeaway seems to be that while encouraging Muslim women to protest against oppression is “racist,” to say “white colonial ‘feminists'” is not. (Again, never mind that Islam is not a race, but white is.)

They advise the protesters to “Take aim at male supremacy, not Islam.” Perhaps oblivious to the fact that some male supremacists are also Muslim. They conclude the letter with the banner “SMASH THE WHITE SUPREMACIST CAPITALIST PATRIARCHY! POWER TO THE MUSLIMAHS!”

One has to wonder, what has colonialism and racism anything to do with defending the rights of a woman to post her own topless photos online without getting stoned to death?

One could give them the benefit of doubt and assume they simply didn’t understand what the issue was, had these women not been from Birmingham and other “western,” “colonial,” “capitalist” and “imperial” cities, instead of the “Global South” and the middle-east. Not only did they fail to address the subject matter, that of a teenage woman getting death threats for no other reason that posting her own photos online, but they muddled the “messed up world” that “we live in” (as they called it) even further. Silence in the face of injustice and oppression is a form of injustice and oppression. Do they really believe Amina deserves to be stoned to death? That she is a “white colonial racist” herself to be fought? Or is anyone who doesn’t agree with their ultra-conservative views is an enemy to be chased away?

Muslim Women Against Femen are not oppressed, but they wouldn’t lift a finger to support a sister under death treat. They wouldn’t recognize her right to control her body and her outfit. They wouldn’t even speak out against the preacher who is openly encouraging others to take matters into their own hands and apply the harsh law of lashing, nay, stoning her. Instead, they took to grinding the ax of “white colonialism.” Like the preacher, they feel threatened, and fear a “epidemic” of sorts.

“Nudity DOES NOT liberate me and I DO NOT need saving” read on of the slogans. Perhaps, but you aren’t implying that Amina doesn’t need or deserve saving either, are you?

What feminist ignores the need of another woman under attack by male preachers calling for her stoning? Apparently those who believe the protests of FEMEN is a “crusade.”

Meanwhile, a petition to prosecute those who threatened Amina Tyler’s life has already collected more than 110,000 signatures. At least there are still some left who differentiate between agreeing with someone’s opinion and agreeing to their right of having an opinion.

Jan 052012

Go Daddy is one of the largest, if not the largest, domain registrar. So it is that much unfortunate that they also support SOPA. The “carpet bombing” attack on piracy dubbed SOPA will most certainly wipe-out many legitimate businesses and gratis sites, not least freedom of speech and news organizations, including human, animal and consumer rights organizations that are sure to step on the toes of some giant corporations in due process. This is sure to put open-source software at risk as well. The broad brush that SOPA is will not hinder any party from unfairly claiming copyright infringement, promptly shutting down a competitor or whistle blower at an opportune time to protect their interests, leaving the receiving party scrambling in the legal-equivalent to quick sand.

I’m joining tens of thousands in boycotting Go Daddy and moving this domain to another, more freedom-loving, technology and internet friendly and, ultimately, sane registrar, at least as far as the future of the internet is concerned. I’ve already started transferring my domain to (affiliate link).

If they don’t see that SOPA will slowly, but surely, stagnate the internet, then may be the boycott will make them. If the numbers are to be believed upwards of 35,000 domains have already transferred. At a nominal $7 annual fee, that’s already a significant chunk of cash lost annually. I expect many have dozens of domains and use some of the more advanced features such as SSL certificates, which is more revenue lost by the transfers. This move could easily cost companies supporting SOPA millions of dollars in potentially long-term, recurring money.

This isn’t an emotional reaction in the name of freedom and human rights, not just. Go Daddy is known to engage in dubious activities and it might be said that they had it coming. One of the more annoying of said activities is giving customers the impression that their domain is about to expire if not immediately renewed. The spam mails start hitting the mailbox 90 days before the expiry. While the warning is fair and welcome, 90 days isn’t exactly imminent in any sense. Of course once renewed, the remaining weeks or months to the actual deadline are lost, thereby shortening the effective period for which one pays. This kind of tactics don’t make the already high prices any more appealing. To add insult to injury, they have an almost weekly promotional spam that dilutes the expiry warning’s effectiveness. I for one learnt to ignore their mail, while having a mental note of when to renew my domain.

According to ZDNet, Go Daddy has reversed its support of SOPA. But as the ZDNet reporter put it “we now know that what really mattered in Go Daddy’s shift in policy wasn’t the legal or ethical issues; it was the old bottom line.”

Well, Go Daddy no more; welcome Namecheap!

(This site might go dark for a few hours during the transfer process which I hope to complete sometime before the 10th of January. I’m working hard to minimize the outage. Apologies for any unavailability or inconvenience.)

Update: Just found out that Bob Parsons, the CEO of Go Daddy group, happens to enjoy elephant hunting! He released a video showing and justifying the barbaric act of shooting and killing a defenseless animal.

Sep 272011

Haven’t we all written Fibonacci sequence generators, sorting and searching algorithms and a handful of data-structures while learning to program? What’s common in these problems is their simplicity. I almost said triviality, but there are nuances that the beginner will stumble in and, hopefully, learn from. (And isn’t that the whole point of the exercise anyway?)

Fibonacci is a great introduction to recursion. Sorting teaches us the fundamentals of algorithms, complexity and of course data-structures and searching. We learn that not all ways of organizing data are born equal. Linked lists have a leg over arrays some of the time, but their ranks are reversed at other times.

This is how we learn about our tools and how to use them and when. It’s the equivalent of painting fences. Without these mental gymnastics we’d have to open up textbooks and look up for “how to find duplicates in two sets” or wonder why the data is sometimes shuffled around, but not always (hint: dictionaries typically don’t preserve order, unless you use one that explicitly guarantees order).

The answer to “why is our product all of a sudden too slow and customers are complaining now when it was lightning fast for years?” isn’t in any textbook. However, if one assumes the customer data might have doubled, a seasoned programmer would first check for a quadratic algorithm (or worse) somewhere in the code-path.

While there is no doubt, at least in my mind, that it’s absolutely necessary to work out all these contrived problems, from writing a 4-operation calculator with an expression parser to solving wick wack woe, I think we should include a whole other genre of problems in our training kits.

The Unsolvables

There is a group of problems that, as far as we know, have no solutions. That is, the solution is known to be found only by brute force or an approximation exists using heuristics (basically trial-and-error or some form of genetic algorithm.) There is the obvious usual-suspects, the NP-Complete folk. But not only. There are algorithms that run in quadratic and polynomial time that aren’t practical beyond some size.

There is no better way to get a very real feel of what it means for an algorithm to run in quadratic time than to actually write the code and see how you age as your machine churns away hopelessly, all the while another algorithm with a lower complexity has just finished.

Take Quick sort for example. Implementing the textbook algorithm will work swiftly, that is, until you feed it sorted data. Multiplication using the school-method is simple and elegant, until you apply it to large numbers. Trying to optimize such a primitive algorithm is very instructive. It teaches you that it’s not about optimization; the complexity is inherent. Yet, we don’t use Merge sort with its O(n log n) worst case performance and default to Quick sort with its O(n2) worst case characteristic. This is not at all obvious to a beginner, and even for many experienced programmers. Theory and practice sometimes do part ways. And that’s yet another important lesson.

Without attempting to solve a travelling salesman problem or a knapsack problem we are in danger of never really understanding why complexity is important. Why some algorithms are hopeless and will get back to haunt you one day, while others seem to be stuck in their misery and can hardly be improved.

And what better way to understand how and, more importantly, why modern cryptography works than to try to factorize numbers? Searching for prime numbers is yet another long-time problem that only recently it was proved that primality testing is polynomial, and how is all that related to one-way functions.

There is also another purpose to this exercise. It’s not obvious where the difficulty of solving these unsolved problems is. At first sight almost anyone presented by such a problem will come up with some solution of sorts. It’s not until much later, and with much mental effort, that one does notice the errors of their ways. It might be a hidden complexity that they introduced in their algorithm while being oblivious to it that negated the gains they scored elsewhere. It might be that the obvious or straight-forward solution misses a very simple, but equally crucial, case. Or, it may be that their solution is broken in one way or another. Either way, it’s not enough to know about the problems, their status and move on. There is much to be learned from solving unsolved problems.

The Impossibles

But why stop there? Why stop at the travelling salesman or a variation of the knapsack problem? While we’re at it, let’s introduce non-computability and noncomputable functions.

I’m sure these topics are very well studied in some grad schools. But the average CS school undergrad would probably firmly believe the fastest growing functions are the exponential. (I still have to get a different answer during an interview.) Whatever happened to Busy Beavers? Apparently, a noncomputable can actually grow faster than any computable function! Now try to beat that in the department of slow algorithms.


I think it would be a great service to our industry if every once in a while the school assigns an unsolvable problem. Send the students home with a travelling salesman problem or two and ask them to bring in the numbers the next week. It’d prove much more instructive to see the 5-city problem solved in seconds while the 25-city…

And who knows, we might as well get a Dantzig moment! (Incidentally, he‘s the inventor of Simplex, the single most useful algorithm in optimization.)

Aug 102011

Few directors dare to leave the audience in complete darkness with a most eerie music and to do than not only once, but twice. György Ligeti‘s Atmospheres makes for an exclusive performance for the first full three minutes of one of the most audacious productions of the 20th century.

An Orion III, Pan Am's first Space Clipper, fe...

Image via Wikipedia

The movie isn’t a typical sci-fi. The slow pace, meticulously-setup scenes and larger-than-life photography takes the viewer’s breath away. Kubrick, a perfectionist in his own right, makes no compromises. The pace of the movie does perfect justice to the surreal, extravagant and colorful shots coupled with the moving music of Aram Khachaturian, Ligeti and Strauss. One can’t appreciate this work of art without first appreciating that the movie is the journey and not the finale.

Considering the stunning special effects in the movie and the human-like voice of HAL 9000, it’s quite surprising that virtually every single sci-fi before and since do not replicate this rather reasonable feat of inevitable progress. And this was done in 1968 no less. Instead, we’re left with robotic-sounding computers and other “smart” gadgets, even though some of them depict events centuries in the future. To add insult to injury, most of them simply do away with the difficulties and logistics of gravitation-free environments. Perhaps the latter is explained in pragmatic terms, but to their credit Kubrick and Clark don’t compromise on this point, instead they actually make for a great experience. The photography of the workout scene and all those involving walking about, be it to serve food on the moon-bus or to get into a shuttle, are simply worth every second on screen as did the multitudes of hours spent creating them. Of the scenes that truly standout in this regard are those where two people are standing perpendicular to each other going about their business undistributed.

No one better than Stanley Kubrick could take the masterpiece of Arthur C. Clark, yet another perfectionist, and do this good a job. Indeed, Kubrick personally must have had an appreciable influence on the development of the plot and story. Even then his work wouldn’t be complete without sharing credit for the screenplay with Clark.

Throughout the movie I suspected the music of the opening, moon-bus scene, intermission and of course the final scene were most probably that of Krzysztof Penderecki. Kubrick had made perfect use of Penderecki’s music his 1980’s The Shinning in addition to Ligeti’s Lontano, which, unbeknownst to me, was also used in the first radio series of The Hitchhiker’s Guide to the Galaxy, along with Melodien and Volumina, which I’ve listen to extensively. Penderecki’s music is no less unique and indeed eerie then that of Ligeti’s, which more than explains why some portions of the his cello concerto was used in The Excorcist, which unlike The Shinning I found lacking and somewhat ludicrous.

After finally watching the movie, I’d like to find time to read the book. The plot and themes touched in the book are simply much more profound than a movie could do justice too. Even at almost 150 minutes, the movie leaves the ending open to wild speculation and personal interpretation. Still, this is certainly one of those classics that not only sci-fi fans, but also those appreciative of grandiose and thoroughly beautiful cinematography would most certainly enjoy. Especially when watched on a large screen with a decent sound system.

QR Code Business Card