Friday, May 8, 2015

What's so scary about gmos? Continued

Let's recall, the question on my mind is "what's so scary about gmos?". As curious individual trained in the sciences, it is our responsibility to understand and explain this fear fairly, with an insight that will be sufficiently penetrating that it will clearly indicate a route through which it might be addressed.

My argument is that the scientific and journalism professions have abdicated their responsibility to provide true popular transparency on the issue.

Let's be honest, the page at on gmo regulations at loc.gov might as well been written to intimidate. The language is thick, the font is tiny. It spends most of the space naming authorities, but very little on the substance of their enforcement. Hunting through the document for the most substantive passage, I settled on this one:

The consultation procedure is meant to enable the FDA to determine if regulatory action is needed with respect to food derived from the new variety such as “significantly increased levels of plant toxicants or anti-nutrients, reduction of important nutrients, new allergens, or the presence in the food of an unapproved food additive.”
In a 1992 policy statement, the FDA reaffirmed that in most cases it would treat foods derived from GMOs like those derived from conventionally bred plants, and that most foods derived from GM plants would be presumptively GRAS.

This is not a popular science document. To anyone who remembers the environmental catastrophes of the '50 and '60, who have fought industrial Goliaths with sweat and tears, who have suffered the blunt edge of the baton of the police officers sent to repress their protests, and who have passed on the memory of these fights to their children, this reads as stonewalling and naive. A "consultation" with once-murderous industries, which generally leads to a potential toxic product being stamped as "generally recognized as safe"? You've got to be kidding, they will say. The actual work the FDA might very well be excellent, but to a justifiably skeptical reader the language on that page gives the opposite impression.

There have been recent efforts to improve the situation.

The web newspaper Vox.com was created for the explicit purpose to address the explanation deficit that I am highlighting. I rejoice at their existence, but their piece on gmo regulation is too short, and lacks specifics.

My own favorite piece on the topic is from July 2013, when a reporter at the fantastic reader-supported Grist Magazine made a heroic attempt to investigate the regulatory situation. And yet, after much effort and searching, even Grist, the best environmental reporters of all, failed to bring clarity in such a way that it could inspire confidence. This, above all, gives a measure of the information deficit that has been allowed to take place.

Saturday, May 2, 2015

What's so scary about GMOs?

A GMO can easily be made to be as toxic to as any pesticides. So think DDT, 2,4-D, Chlordane, Agent Orange, Heptachlor and all that.

To be technologically precise, one could not literally put these molecules in a plants' genome, but other similarly dangerous molecules are quite feasible.

Presumably, pesticide can be studied carefully, scientifically, and deployed under the supervision of an agriculture engineer who will express utmost respect for the health of their neighbor, and for the environment that supports all life including humanity's. In practice, that's not what happened.

Pesticides were applied indiscriminately, with wanton abandon and callous disregard for safety. Farm employees died, cancer rates exploded. It was decades after the publication of Silent Spring, the birth of the modern environmental movement, and massive million-people protests throughout the country that national politics began to take notice of the issue. Only then were somewhat effective regulation put in place.

So given the history here, it seems justifiable to expect large agriculture companies to behave with as little care for the health of the broader community as they displayed back then. Similarly, American politicians could be expected to be as laggard as they were back then, or perhaps worse in the eyes of anyone who believes this political system has been switching from democracy to plutocracy.

In sum, like all other novel technologies with potential for both profit and harm --medicine, cars, planes, rollercoaster rides, bodypiercings, etc-- GMOs raise questions of trust, regulation, enforcement, transparency, and struggles of interests. Technologists like myself and yourself would much prefer to see technology used wisely as a matter of course. Alas, it cannot be the case, and thus GMOs necessarily have a political dimension.

Given this, the question we should be asking is: what are the key features of the body of law that regulates the safety of GMOs, and can these be trusted to be effective?

Here with hit a wall. It is nearly impossible to know. Let's out me as the rather obsessive readers of news that I am. I can speak about the FDA drug enforcement rules, the FCC's, the EPA, the WHO, the Feds', the Dodd–Frank Wall Street Reform and Consumer Protection Act. I could probably fill a page or two with details of how Obamacare work and why it works. I love watching crash test dummies videos; I listened to the all the Plane Crash Engineering Investigation episodes I could get my hand on. And yet, I have no clue about GMO regulation.

I challenge this reader to find a long-form piece in any national American newspaper, let's say between 1990 and now, that explains how this country establishes the safety of a GMO in a legally binding manner, and what penalties are scheduled for abuses. Who introduced the bill and who paid for their reelection campaign? What were the different schemes considered? How do American GMO safety regulations compare with those abroad? Are they better, worst, same? Nobody knows.

American science journalists have done a pitiful job of providing transparency to the situation. Now that it's 2015, there is nobody left to do it since nearly all science journalists at large newspapers were fired when Craiglist cannibalized the papers' ad revenues. A well-earned popular distrust of GMOs grew into that vacuum and it's just a sad situation all around.

Tuesday, January 27, 2015

What renewable energy products on the market today are capable of heating a Boston brownstone in winter?

The title started as a rhetorical question. Turns out it is actually quite easy to give a practical answer.

Step 1: Hire an architect house with experience in energy efficiency retrofits on old New England houses, such as the folks at http://zeroenergy.com.

Step 2: Bring up the insulation rating of the house up to the Passive House standard. Think of it as LEAD Silver, one step higher. Check out http://nypassivehouse.org/. This costs around $200 per sqft.

Step 3: Reap the savings. After the retrofit, heating costs are reduced five-fold, from $8 per sqft to $1.50. This has a Return-On-Investment period of 10 years, afterwards the energy savings are money in the bank.

Step 4: Generate the energy needed to heat the passive house by buying shares of a windmill coop. You will need one-fifth of 1/6000 of the Berkshire Wind Power Coop project, which is a one-time cost of around $2100 plus a few cents for maintenance.

Done.

The only reason people don't do this is because, either (1) they actually enjoy giving oil company their money (ah!) (2) they don't own their house, or (3) they don't know that the technology is available today, or (4) they cannot stomac the 10-year investment horizon.

If you are in that 4th case, keep an eye open. There are banks that specialize in doing these sorts of investments, Solar City does it for solar panels, for instance. But overall they are few and hard to find at the moment. Still, it's totally worth doing.

This article at ft.com talks about some folks in New York who did just that.

Wednesday, November 19, 2014

Lesson of a Rosetta Scientist's Shirt

The New York Times just wrote a fair piece on Matt Taylor, the British Scientist from the Rosetta Mission team who showed up on the big day with the wrong shirt.

It's a heart warming story, truly. A dear friend hand-makes a fun, bold bowling shirt, for their scientist friend. The scientist decides to honor the gift by wearing it on the glorious day when their mission makes humanity's first ever landing on a comet. Wow! Hurrah for science! Hurrah for breaking down stupid stereotypes of lab coat scientists and injecting some personality in the day!

Except there is just one thing: the shirt shows, among other things, sexist images of women.

The debate is on. What exactly is wrong with the shirt? And what should be done about it?

Let's break down its many layers.

Layer #1-- Taken literally and absent of any social dynamic, the illustration on the shirt is sharply unpleasant to look at for many women. That's on a purely aesthetic basis.

Layer #2-- The shirt exists in a cultural context in which many women nurse old wounds of objectification and sexual aggression. To them, the illustration is a reminder (or an outright trigger, the case may be), which piles on the unpleasantness of Layer #1.

Layer #3-- Absent of any intent, the shirt is a reliable signal that the wearer is at least unaware of its impact on many women. Knowing that at least one man in the organization lacks that awareness suggests the place does not value developing in its members the kind of understanding of other people's perspective that's needed to work well as a diverse team. That always makes things hard when you are the underdog.

Layer #4-- The shirt opens the possibly that the wearer does in actuality love the shirt, at least in part, because it displays a woman entirely "as a heterosexual man sees her", removed from any depiction of her own agency. Granted, it's not a given that the person is an avowed misogynist. Granted, it's not at all a given that the shirt is used as a kind of twisted awareness campaign supporting objectification, let alone supporting rape culture --this shirt is not as grossly unambiguous as the ones that read "no means yes, yes means anal". But the possibility is open all the same, and that's uncomfortable.

Layer #5-- Once the possibility is open, stereotype threat kicks in. Stereotype threat can easily kill 60% of someone's performance in a controlled environment. In an organization, this means many great women will leave for an environment where the whole 100% of their creativity can express itself.

These five layers are active regardless of the wearer's intent. Here, morals of intent and morals of impact split. What exactly should we do with a very negative impact done by someone with no ill intent?

One of the best attitudes I know is Hacker School's: "[once your impact is pointed out to you], apologize, reflect for a second, and move on."

Unfortunately, Matt Taylor's case doesn't make that possible. He participated in a major cultural event, at the very same time two other large misogyny conversations are burning all over the internet: (1) gamergate and the associated terrorizing of outspoken women in the game industry. (2) the exiling of women out of computer science, out of the Valley, and in particular Uber being outed in a big way this week. It's unavoidable then that Matt would become a symbol of a greater problem. Strictly speaking, that's unfair to the individual involved. Still, when history knocks at your door, isn't it one's duty to answer it with greatness?

Friday, April 4, 2014

On Mozilla's new CEO Brendan Eich stepping down

Recall, Mozilla is not a technology company. It is a civil right organization that works in the technology space. It believes that freedom of speech, freedom of assembly, and notably freedom from being spied by upon for political gain by powerful people, can only be guaranteed so long as the technologies that make up the internet remains free, open and controlled by the people -- not by corporations and not by governments.

That is its reason for existence. Everybody within Mozilla powerfully resonates with that mission, else they wouldn't be there.

When we discover that the NSA makes secret deals with private companies to insert spying code into commercial software, which is then used to spy on international leaders during world trade negotiations, the Mozilla foundation redouble its effort to construct a spying-proof browser. Call it applied technological civil right activism.

Civil rights, in essence, means defending the powerless against bullying by the powerful. Defending the poor against class war from the rich. Defending the minority against imposition by the majority.

Thus for the Mozilla Foundation and its supporting community, is it unavoidable that its leadership must be judged by the excellence of their judgement in matters of civil right. Eich failed in two ways. First by taking the heteronormative position, he participated in harming a minority (He has since apologized for that harm.) Second, by using his wealth to bend the democratic process, he participated in corrupting the one-person-per-vote principle that is so important in protecting the voice of the people against moneyed interests.



Sunday, March 23, 2014

Quick personality quiz for libertarians: are you a Free Marketeer?, or a Pro-Capitalist?

A free marketeer is someone who believes that through the free flow of information, free choice and free exchanges, we will see arise a healthy, prosperous and fair society.

A pro-capitalist is someone who believes that society will, on the whole, be better-off if important decisions about society's efforts and production potential are made by the people who control a lot of monetary capital.

Both attitudes are currently flying under the banner of "Libertarianism". Yet they are very different and distinct. What's more, both claim Adam Smith for their camp, when he clearly repudiated one of them.

We can tell the two apart with the following litmus test.

Over the last eight years, 37 technology companies have come together and agreed to never hire each other's employees, since the waves of hire-rehire were raising salaries and eating into their profits. The agreement was made in secret through verbal communication between CEOs and kept off the record as much as they could manage.

Should this be illegal? And if so, how severe should the punishment be?

Under free marketeering, this is called collusion by market-controlling players to fix the free prices of the market. It amounts to wage theft and the punishment should be at least as severe as if the company had stolen the money directly from their employees' bank accounts and called it "profit."

Under pro-capitalism, the CEOs' judgement is de facto authoritative, following a conviction that if these CEOs have made this much money, certainly this is a proof of good judgement, and their calls have no need to be second-guessed. This is the view the Adam Smith abhorred.

Investigative reporter Mark Ames at Pando has been writing track of the legal action taken against the companies:



In the comments, many individuals are defending the CEOs along pro-capitalist lines. I suspect -- I worry -- that these folks think of themselves as Adam Smith-style libertarians, when they are no such thing. Perhaps they have not actually read him.

Reading "The Wealth of Nations" I found myself learning a whole lot more about the price variations of wheat and of tariffs in the 18th century than I thought I ever would. I also learned about the rampant misery and poverty then. Adam Smith largely blamed this sad affair on market collusion by heavy actors, often through cartelling to fix the free market, alternatively through lobbying and corrupting the government.

Needless to say, it was eye-opening to see the distance between the fantasy made of Adam Smith's position by the pro-capitalists with the writing of the man himself.

I would urge the honest free-marketing libertarians to speak up loudly in these cases when their ideals are being co-opted by the pro-capitalists.

Monday, December 30, 2013

How to Pen a Political Takedown Note, in the style of Krugman

One short sentence announcing what is happening, in general, absent of this particular feud. Two sentences stating your opponent's opinion, in a manner that is fair and they they would recognize. A few words stating that they are wrong (or very wrong, or catastrophically wrong, the case being.)

A promise of a detailed explanation later, but first, come context.

One or two or five paragraphs of necessary historical and philosophical context, as most questions deserving of a detailed response are really deserving of essay-length reflections. But this is the internet, five paragraph will have to do.

Two or three paragraphs articulating your rebuke to your opponent, in light of the historical context. The key here is to help the reader put two and two together -- resist the temptation to lean on any sense of authority. Now is not the time to be the delivery person of the Judgement Inc. Corporation. Present the argument fairly and sternly. 

One line calling your opponent a ditwit or some such. By the time you get here, you've earned it

Saturday, September 21, 2013

Health care in America is funded by the government to a greater extent than in Canada (reprise)

Little known fact: Health care in America is funded by the government to a greater extend than in Canada. Between Medicaid, Medicare, Military Health Care, and emergency room services for the non-insured or the under-insured, the American government pays US $2,728 per person per year for health care.

In Canada, the government pays only US $1,893 per person per year. That's 30% less.

With that money, the Canadian government manages to cover everyone with world-class quality care. Even though the American government is paying more per head, its money only manages to cover a small fraction of its population, with the rest being left to fend for themselves with private insurance companies. These companies charge higher prices for coverage than even the USA government spends, let alone the Canadian government (about US $8000 per year) and outright refuses to offer their services to 20% of the population.

This leaves the United States with the largest population in the world without access to health care, and the highest rates of bankruptcy. In the US having a medical emergency often means going bankrupt. Bankruptcies arises whether or not you have private health insurance coverage since private insurances cover so little (when they do offer coverage) that their disbursement are rarely sufficient to avoid bankruptcy. 62% of all bankruptcies are caused by medical events.

The strangest aspect of American health care is the presence of folks who are rabid defenders of the American system, who speak without any awareness of the current system's failings, and without any knowledge of the alternatives.

The case of death panels angst is particularly poignant, since one keystone pillar of the new health law is to force private insurances to abolish their "Do Not Treat" list -- from 20% (mentioned above) down to near zero. The law:
  • Forbids insurance companies from discriminating based on a disability, or because they were the victim of domestic abuse in the past (yes, insurers really did deny coverage for that)
  • Says health insurance companies can no longer tell customers that they won't get any more coverage because they have hit a "lifetime limit".
  • Says insurers can't just drop customers once they get sick.
  • Forbids "pre-existing conditions" for kids under the age of 19.
and on January 1st, 2014,
  • no more refusal of care because of pre-existing condition at all.
The law does all this without establishing any new form of government coverage (Medicare, Medicaid, Military health care, and uninsured health care remain largely unchanged.) What list could "death panels" possibly be referring to? Nothing at all, that's what.

Then there are the claims about the amount of money different governments have to spent, claims that certain numbers ought to be ruinous, yet the arguers never put in the effort needed to look up the numbers. In many anti-Obamacare posts, the key thing to notice are the appearances of the word "handout", which reveal the nature of their conception of the role of government.

While governments are generally constructed to take care of domains where the private sector does poorly (such as health care -- the specific economic reasons are too long for this post, but are covered in most introduction to economics textbooks, if you are curious). Anti-handout people understand governments principally as a transfer of wealth to receivers of handouts. This attitude is also known as class-war-ism, and is one of the most corrosive forces in modern American politics.

Government Number Source, Wikipedia

For more details on the content of the new Obamacare law, read this fantastic post in the fantastic subreddit titled Explain It Like I'm Five.

Thursday, June 6, 2013

Scary hypothetical: Your email account just got hacked

Ouch, your email account just got hacked. Sorry this is happening to you. We live in an age of computer security where the spammers and scammers have the upper hand. Hopefully the wind will turn soon.

Very possibly, the spam the hacker sent went to all sort of people, not just to your contact. Very possibly they also emailed to a list of targets the spammers have grabbed from around the web, and from other hacks. They merely used your account as a conduit to make their email fly with artificial legitimacy, so they wouldn't trip the recipient's spam filter. That sucks, I know.

Here's what you need to do, from most urgent first:
  1. Change your password at Gmail or Yahoo, or whichever service you used. Hopefully you already did this. Preferably, change your password from a different computer than your usual one: In the worse case, there is an attack virus on your computer watching you enter the password updates. That would be bad.
  2. Change your password on all sites where you have used the same password, or a derivative of the password, or a similar password-generation scheme.
  3. Turn on two-factor authentication on your account. This will be a huge win in securing your account going forward. Lifehacker describes the feature in details.
  4. Start using Keepass to generate and store securely a different password for every website you have a password with. Every password will be super random and super long, and thus super secure. See my blog post on this topic here.
  5.  Do a thorough scan of your computer for viruses and trojans. Follow the instructions here. If that seems intimidating, bring your computer to a friendly local computer repair shop.
If you find Keepass intimidating, the alternative is to change all your passwords to fresh passwords generated using XKCD's excellent (and fun!) schema. Then you write them down on a sheet that you keep by your computer. Then make some copies and store them in different secure places, such as where you keep your tax information and what not.

It might seems counterintuitive, but these days, physical security is vastly stronger than online security, so while this practice isn't exactly as strong as using Keepass, and not as convenient, it is sufficiently strong for most purposes. Petty thieves are just not known for rooting around people's house for printed password lists, and if they found the list they wouldn't know what to do with it.

When choosing passwords, adding a punctuation mark doesn't nearly work as well as it used to. The reasons are two-folds:
  1. Most hacks don't actually involve breaking the password. They get in by defeating the security of either the website itself, or that of your computer, or through a phishing email. That's where two-factors authentication really shines. http://en.wikipedia.org/wiki/Phishing
  2. Hacks made by breaking passwords involve a website being hacked and its users password list getting stolen. The thief then cracks as many passwords as they can, offline, using massing supercomputers rented by the hour. They then proceed to attempt to login into other websites using those credentials. You can read the story the devilish effectiveness of this technique in this fantastic long-form article at the always top-notch publication Ars Technica
Thus my recommendations in support of two-factor auth and Keepass.

And in case you are asking, yes, Macs are just as vulnerable. Now that everything has moved online, it doesn't matter much which kind of machine you are running. The more prominent attack vectors I was describing, breaking into the website and phishing, don't involve your machine at all. An attack into your laptop most likely would involve your browser, and those are largely the same across platforms. I know plenty of Macs who have been hacked, and in some ways, getting your Mac hacked is worse, since Apple controls the machine so deeply. A salient story here is that of the famous technology reporter at Wired, Mat Honan, who had his Mac hacked and destroyed remotely.

To end on an up-note, I do feel the wind is turning. This new two-factor authentication feature many websites have began implementing is a huge breakthrough for everyone's security online. As two-factor become popular and widely used, I have great hope that we will see a stunning decrease in the number of people affected by hacks and hackers. Plus, at this point we can more or less trust that hardly no one clicks on the links sent by these attacks, which demonstrate how far we've come along educating each other about this new topic of online computer security that was imposed onto everyone a few years ago. This too, deserves to be celebrated and it bodes well for the future.

Good luck.

Monday, April 1, 2013

Happy World Backup Day!

Today I am grateful that my electronic devices remembers all those pesky little wonderful things for me – such as my wedding pictures and what not.

Would like to invite everyone to check and make sure that all the files are secured and properly backed up at least once a year. And what better day for this than March 31, the day before the Internet goes silly.

In that spirit, I would like to share my very own backuping recipe.

Our two Windows laptops both run Dropbox in order to protect the most important files. One laptop runs on the free plan, the other we pay $8 per month for some extra space. Some of the larger files are are impractical to backup at Dropbox, specifically our videos and raw-format pictures. For these, we have a USB hard drive plugged into a Asus RT-n16 router which acts as a small file server. This drive is the destination for two processes. First, the laptops run the free software Duplicati.org which copies recently changed files to that hard drive over our home Wi-Fi every night. And second, we use the free version of the program Macrium Reflect to make for images of our hard drives every so often. This way if a laptop gets stolen or damaged, we don't have to reinstall everything from scratch.


The story of how Pixar almost lost Toy Story 2

That little hard drive could the stolen at once, so I wouldn't rely on it without some form of off-site backup. For this, I installed a copy of the open source software Tomato on the Asus router which lets me run small Linux programs on it. I have a script that copies the file from the hard drive to Amazon S3 file storage service which offers some of the most inexpensive hard drive space rentals available.

The logic here is, our laptops are not ON at home for as long as you might imagine. In true New York style, we move about town a lot and spend copious amount of time slipping overpriced coffee, using various coffee shop's free Wi-Fi. It would seems impolite to backup large files over their connection. Better to backup to the small drive at home, over the super-fast 802.11n connection, and let the daemon process running on the Asus router upload at leisure throughout the day.

All our hard drives are encrypted using the open source program TrueCrypt, to protect our privacy and identity in case of theft of the devices. All our passwords are unique, randomly generated, and stored encrypted in the open source program Keepass Professional. Keepass's encrypted file itself is in our Dropbox folder, this way it gets backuped in turn.

Finally we upload our music to Google's music locker, at music.google.com/, which is free up to 20,000 songs

I must say, this setup is the best I've felt about our backup setup in years (knock on wood). All our data eventually makes it to off-site storage, and all the most important steps are automatic.


What is your backuping recipe?

Monday, April 23, 2012

Dear UofCS, it's really too late to be talking about light bulbs


Union of Concerned Scientists asked:

Unchecked  Working in my garden and tending to my lawn.
Unchecked  Lying on a beach or teeing it up on the golf course.
Unchecked  Playing in the snow or reading a book by the fireplace.
Unchecked  Playing video games or watching the latest blockbuster.
Unchecked  Enjoying a book on my e-reader.

Hi UofCS, I love your work. However, this particular question misses the mark.

You see, as I matter of fact, I do not spend my free time in any of the activities you have suggested. I spend my free time advocating for bold climate change mitigation policies. I spend my free time teaching the science of global warming, or writing articles describing the science of global warming that draw hundreds of thousands of views. Such as this one:


Your current messaging suggests that this problem can be solved via individual actions. You and I both know that is not the case.

China will build enough coal-fired power plants this year to relegate all our lightbulb changes to a footnote. There are powerful interests at work who are bent on burning every pound of fossil fuel available on this great Earth, in the name of their own profit. Turning down our living room's thermostat will do naught to stop them. We have to consider the stark reality and ask, what will it take to stop these people from destroying humanity, from destroying themselves?

We need to teach the science of global warming which such conviction in our voice, and with such unbearable clarity, that our fellow Americans will join us in Washington the next time. They will have to courageously stand to be arrested in the mist civil disobedience actions, along with me, my friends, and McKibben and Hansen.

How does talking about light-bulbs-talks helps this? I don't think it does.

I would invite you to consider pivoting to a different messaging frame for your next cycle.

Teach people the science. Teach them the true extent of the dangers of the A1B scenario we are tracking at the moment. Then teach people how to teach the science and find them stages and audiences. Teach them how to defend those who teach against the brutal slanderous attacks of our opponents. But above all, teach them that if we are to you get out of this crisis, they will have to be more implicated in the politics of their country than a mere vote every two years.

Wednesday, April 18, 2012

Me, Dragon NaturallySpeaking at 70 WPM


This is a video of me dictating the text of this blog post.


I posted a longform article on how to use Dragon on my blog, which you can find here:


The short story is, modern dictation software works out-of-the-box. Forget about training, there is no training anymore.

With a fast CPU, lots of memory, a solid-state hard drive, a good microphone, and good pronunciation, you can effortlessly hit 100 words per minutes, or more if you happen to be the kind of person who talks quickly. I even know a number of people who have discovered themselves as authors thanks to the productivity-boost of dictation.

It does not take a crazy machine. I have a HP EliteBook, a i7 M620 2.67 GHz CPU, four gigs of RAM, and a Intel SSD. Perhaps the most important piece is the microphone. I used to have a Sennheiser headset microphone, which was great at cutting off the voices of people talking around me in the office. But then I switched to a self-standing USB microphone because I would rather not have something on my head all day. You can find it on Amazon.

The point is, the dictation is great.

In the video, I'm giving you a sense of how quickly I correct the recognition mistakes as I go along. I don't bother with "scratch that" or Dragon's other correction commands. You can see how I use the mouse liberally and I jump in with the keyboard when I know Dragon won't hear the word I'm about to type. The only words Dragon did not know about were i7, M620, and EliteBook (which I added to its dictionary beforehand). Everything else is built-in.

After dictating, I quickly scan the text correcting the mistakes, missing one ("it" instead of "hit").

All-in-all, it took 3 minutes to dictate about 200 words, including all the fiddling, which adds up to 66 WPM.

Thursday, April 12, 2012

Here's what a real liberal solution looks like.


Create a nation-wide network of government-run daycare. This cost $100 million. Net result, lots of competent, talented women who wished to get a job but couldn't because they couldn't afford daycare now get jobs. These women pay $147 million in taxes from their new job, which pays back the $100 million the government started with, and let it lower taxes by $47 millions. Everybody wins.

A Libertarian would never think of trying this.

But in Quebec, it's the first thing you try.

Saturday, February 11, 2012

So, you want to learn how to program and build a website

Generic advice for non-technical people who are contemplating starting a website project. It's generic advice, but it's important.

There is a level of complexity that cannot be built without learning about the technology, not at any price. Technology is a funny thing, there is a point where throwing money at the problem cannot substitute for actually knowing the technology. I would say in the last 10 years, this effect has become even more powerful than it was before.

It's pretty common for people to try to start technology-based businesses by hiring programmers, but that fails because if you don't understand the technology, you can't control the programmer's work. Programming is a peculiar craft. There are no discipline where the information asymmetry is larger. When a programmer tells you "I promise I'll be ready next week", you have no way to verify whatsoever, unless you have significant technology training yourself.

If you have trusted technology friends on board, then you are good to go. So long as you don't need to hire programmers, you're golden.

But look at how many people it took to build kickstarter. I guarantee you most people on this page are elite technologists. Building website gets real hard, real quick, knock-your-socks-off quick even. Or look at Padmapper. At first view it might appear to be a rather simple website. But the guy who built it is MIT Computer Science '07. He lists as programming languages: Objective-C (iPhone/iPod Touch), SQL, PHP, Ruby on Rails, Javascript, JQuery, Java, C, HTML, CSS, Google Maps (see PadMapper), Microcontrollers. Again, not someone who spent the last week reading a web page on how to program. We're talking about top-of-top-line, world class programmers. These people cost $100'000 to $200'000 a year, but you probably can't hire them because they are too busy starting their own thing, and even if they weren't, people like that don't work for people who don't know tech. That's how hard this stuff gets.

There are three paths forward for non-techies:
  1. Associate yourself with trusted techie friends who believe in you and will work alongside of you (you can't be their boss.)
  2. Start brainstorming ideas for businesses that aren't so tech-heavy.
  3. Learn a lot of tech.
And of course, the more of #3 you do, the more techie your #2 can be. Otherwise, Wordpress goes a long way, even in the hand of someone with limited tech knowledge. And if you take a short course on web technologies, it should empower you to make Wordpress sing with all its got.

The good news is, as a 2nd reason for why programming is a peculiar craft, it is actually possible to learn how to program at a professional-level without taking classes. But not everyone can pull it off. So, if you are going to take a course, get the most out of your money. Which means, try to learn as much programming as possible on your own before starting the course.

Good resources:
There is no need to spread wide. Pick one teacher (a single book, etc) and follow them for a while. The first task in front of you is to learn how to program. Once you know how to program, you can pick up 10-20 languages easily. Learning a new programming language is super easy, learning how to program is hard.

If you are in for the long term, and you want a principled, in-depth, Computer-Science-y approach, then learn with Racket as a starter language, then transfer to a popular pro language.


Sunday, January 15, 2012

Instant run-away-from-this voting system

The rumor is that the Liberal Party of Canada has just voted in caucus to support a switch to instant runoff voting (IRV). With IRV, you rank the candidates. Once all the votes are in, candidates are eliminated one-by-one from the bottom, until someone wins.
That's good news, IRV is a vast improvement over first-past-the-post. Except it is not the best system. It is too complicated -- enough that the UK's tentative to switch to IRV failed, in part because the pro camp couldn't explain it --, it has some trouble spots, and a simpler system performs better.
Check out this fantastic visualization of the differences between the different voting systems. IRV, like first-past-the-post, will sometimes elect someone nobody really wants.
Approval Voting Instant Runoff Voting
In the images, the dots are candidates, and the colored regions around the dot label the range of pooling results which leads to that candidate winning. Under IRV (right-most image), the red, the yellow and the blue candidates all intrude on pooling space that ought to belong to the green candidate.
A better alternative is approval voting: people vote for as many candidates as they want, then the candidates with the most votes wins. It is simpler at the pooling box -- no need to tediously order the candidates -- and vastly simpler to explain.
Here's how things went when I found myself describing these two voting systems (at different times, in different working groups):


Approval Voting

-- Vote for however many candidates you want. You can vote for one, for two, for some of them, or for all of them. However you want. The person with the most votes wins.
-- Ok.


Instant Runoff Voting

-- Don't worry what IRV means, just list your three favorites candidates. Spot 1 is for your most-favorite candidate (don't be confused, it doesn't mean 'Spot 1 receives 1, points Spot 3 receives 3 points.') When all the votes are in, your vote will go to your #1 candidates. If s/he doesn't win, s/he's out of the race, then we count again, but your vote now goes to your #2 candidates. And so forth, until there is only one candidate left. That person is the winner.
-- What do you mean "And so forth?"
-- I mean it's an algorithm and we had a programmer code it into a computer because the old people who volunteer at poling places sometime don't understand it.
-- confused look. I don't understand. Can you explain it again?


That's why I would rather advocate for approval voting. IRV is near impossible to explain to a non-algorithmically-inclined mind. Its opaque name echoes its complicated procedure. And it for all its trouble, it has worse mathematical properties than approval voting.

Tuesday, January 10, 2012

How to turn a Python loop into a Clojure 'reduce'

This is my answer to this Stack Overflow question.

I wrote a simple stack-based virtual machine in Python, and now I'm trying to rewrite it in Clojure, which is proving difficult as I don't have much experience with Lisp. This Python snippet processes the bytecode, which is represented as a list of tuples like so:


[("label", "entry"),  ("load", 0),  ("load", 1),  ("add",),  ("store", 0)]

pc = 0
for inst in code:
  if inst[0] == "label":
    label = inst[1]
    self.labels[label] = pc
  else:
    self.code.insert(pc, inst)
    pc += 1


I'm going to give you a general solution for these kind of problems.
Most loops can be done effortlessly with a strait forward mapfilter or reduce, and if your data structure is recursive, naturally the loop will be a recursion.
Your loop, however, is a different kind of loop. Your loop accumulates a result -- which would suggests using reduce -- but the loop also carries a local variable along (pc), so it's not a strait reduce.
It's a reasonably common kind of loop. If this was Racket, I would use for/fold1, but since it's not, we will have to shoehorn your loop onto reduce.
Let's define a function called load which returns two things, the processed code and the processed labels. I will also use a helper function called is-label?.
(defn load [asm]
  (defn is-label? [x] (= (first x) :label))
  {:code <<< CODE GOES HERE >>>

   :labels
   <<< CODE GOES HERE >>>
  })
Right now, your loop does two things, it processes the code, and it processes the labels. As much as possible, I try to keep loops to a single task. It makes them easier to understand, and it often reveals opportunities for using the simpler loop constructs.
To get the code, we simply need to remove the labels. That's a call to filter.
  {:code (filter (complement is-label?) asm)

   :labels
   <<< CODE GOES HERE >>>
  }
Reduce normally has only one accumulator, but your loop needs two: the result, and the local variablepc. I will package these two into a vector which will be immediately deconstructed by the body of the loop. The two slots of the vector will be my two local variables.
The initial values for these two variables appear as the 2nd argument to reduce.
   (first
    (reduce
     (fn [[result, pc] inst]

        << MORE CODE >>

     [{} 0] asm))
(Note how the initial values for the variables are placed far from their declaration. If the body is long this can be hard to read. That's the problem Racket's for/fold1 solves.)
Once reduce returns, I call first to discard to the local variable pc and keep just the result.
Filling the body of the loop is straight forward. If the instruction is a label, assoc into the result, otherwise increase pc by one. In either case, I construct a vector containing new values for all the local variables.
     (fn [[result, pc] [_ arg :as inst]]
       (if (is-label? inst)
         [(assoc result arg pc) pc]
         [result (inc pc)]))
This technique can be used to convert any accumulator-with-locals loop into a reduce. Here's the full code.
(defn load [asm]
  (defn is-label? [x] (= (first x) :label))
  {:code (filter (complement is-label?) asm)

   :labels
   (first
    (reduce
     (fn [[result, pc] [_ arg :as inst]]
       (if (is-label? inst)
         [(assoc result arg pc) pc]
         [result (inc pc)]))
     [{} 0] asm))})
(println
  (load
   [[:label :entry]
    [:load 0]
    [:load 1]
    [:label :exit]
    [:add]
    [:store 0]]))