Two Apps to Ring in the New Year!

New York City's Times Square Alliance is has released a free app that will provide a commercial-free live stream of the Times Square New Year's Eve webcast.  You can check it out on iTunes here.

AgupieWare's exclusive New Year's Eve Nosie Maker app is also available from the App Store.  Bring the noise!

Schneier: "In the coming years we're seeing a lot more power struggles play out on the internet."

From an interview with Vice, Bruce Schneier speculates about how power struggles will play out on the internet in the coming years:
The internet is interesting because it really changes so many things. When the internet was born, there was this belief that it would vastly change the power structure. There's a great quote from John Perry Barlow in the mid-'90s at the World Economic Forum, and he basically says the governments of the world have no business on the internet, that have no power over the internet. You can't legislate it. The internet is it's own thing. It's a really utopian way of looking at the world, but we believed it. We believed the internet would change the world, would give power to the powerless. And it did, for many years. The ability to organize, to coordinate—it made so many things different.
And that changed recently. Governments discovered the internet. So now we're seeing that in China, for example, the internet is a tool of social control, and now both sides are using the internet. The Syrian dissidents are using the internet to organize, the Syrian government uses the internet to round up dissidents. That interplay between the institutionally powerful—the governments and corporations—and the distributively powerful—dissident groups, criminals, and hackers. How they both use the internet to increase their power, how they use the internet against each other, I think is fascinating. It's something that we need to look at. In the coming years we're seeing a lot more power struggles play out on the internet. And I'm just curious how that's gonna end up—it's not at all obvious.

Online Learning: Teach Yourself Python in Less Than 4 Months, Part I

The purpose of this article is to lay out a general time management template for anyone who wants to jump in to programming and computer science with little or no experience in the field.  A future article will flesh out the details, providing links to learning resources and other materials freely available online.  [Edit: See the second article in the series, which covers learning benchmarks for beginner Python programmers.]

For starters, I should say up front that I do not have any formal background in Computer Science. I'm a language teacher by trade and training, and never really considered myself a "computer person."  But some time back, after expressing some interest in programming to a programmer friend, he challenged me to try and pick up a programming language. The gist of his argument was fairly straightforward: if you can understand English, with a bit of effort you can understand a programming language, it's just syntax and semantics.  That made it sound pretty simple, and my interest was piqued, so I set to work. 

After doing a bit of background research, I decided that I would focus on the Python programming language, using MIT's Introduction to Computer Science and Programming course – all the materials for which are available for free online – as my general guide.  I finished that course within three months, supplementing it with tutorials and readings that were more in line with my own particular interests. The skills and knowledge that I acquired in that time have proven to be indispensable in my daily life, for both work and play, so much so that I wonder how it is that I was able to get by for so long without them! 

As stated above, I do not have any formal background in computer science.  However, I have over ten years of experience in planning, developing and teaching natural language learning curricula, from task-based lessons to overarching course goals, in two languages.  This article will lay out a general time-plan for self-guided study of the Python programming language for absolute beginners, using the MIT Introduction to Computer Science class as its overarching framework and scaffold.   

To begin our assessment, let's take a closer look at the MIT course. The class has 26 lectures, each about 50 minutes long, for a total of 1300 minutes, or 21 total hours of time, less than a single day.  In theory, you could easily blow through the whole course's lecture series over a long weekend, if you did it like it was your job, or a marathon of your favorite television series on Netflix.

Obviously, that does not mean you can learn all the material covered in those lectures in a three day period.  The process of learning requires things to sink in, as it were, and that just takes time.  Furthermore, it just wouldn't make any sense to simply blow through all the lectures in this way, because we still have to account for the recitation/discussion sections associated with the course, as well as for the independent study necessary to complete homework assignments, which would be normal for any university course. 

In a serious course of study at any college or university, and even for graduate level work,  disciplined students should expect to devote around ten hours a week to study for each course they take.  Assuming a full time work week of 40 hours, this would make taking four college or university classes the labor equivalent of a full time job. 

To begin working out our time table, let's therefore assume that a person should devote 10 hours a week to this project.  A college semester is about 15 weeks long, so that comes out to 150 hours of total work to successfully complete a course that like offered by MIT.  Assuming you did nothing else except this, as if doing the work for this single course were a full time job at 40 hours a week, you could complete it within a month. This is doable, but very intensive. To finish in 3 months, you'd have to devote 12-13 hours to it a week.  To finish in six months, you would have to spend 6-7 hours on it a week.  To finish it in a year's time, you could spend just 3-4 hours of work on it a week. 

For the sake of simplicity, let's assume that we have 10 hours a week to devote to this project, taking our benchmarks and cues from the syllabus for the MIT course.  (We'll work out alternative time lines at the end of the post.)  What do we do with all this time?  The answer is deceptively simple:  watch the lectures, read, do tutorials and exercises, and begin work on your own individual programming projects.  Let's flesh this out a bit.   

With 26 lectures at 50 minutes each, that comes out to 100 minutes of lectures a week, the equivalent of the time you might spend watching a bad movie you wish you hadn't watched to begin with.  In a university course, each week you are also going to spend around another hour in your discussion/recitation section, reviewing materials covered in the corresponding lectures.  That leaves us with around 7 hours and 20 minutes of time for independent study.  How should one spend that time?  Reading, research and practice. 

Let's assume that in a given week, the professor covers more or less the same materials that can be found in the course textbook, in more to less the same amount of time that it would take you to read those sections of the text(s).  So now we have a ballpark figure of 1.5 hours to devote to reading, leaving us with just under 6 hours of time left for the week. 

Doing the reading is not an end in itself, there are also homework assignments that need to be completed. In the MIT course, the homework and problem sets reinforce the lessons covered in the lectures. However, as you complete such exercises, you will find that there are things in the textbook or from the lecture that you did not understand, or you will come across a problem that requires looking into something that has not yet been covered in the lectures or readings at all, and you will therefore have to inquire into these things a bit more closely. So homework will also necessitate more reading, research and tutorials.

Let's assume that doing the homework requires about as much time as you would normally spend in class including discussion section, around 2.5 hours.  We're now left with 3.5 hours of free study time to do with as we please.  This can be spent doing more background reading, tutorials, exercises, or working on one's own little programming projects. 

So here's our plan for 10 hours of work a week, to complete the course in about 15 weeks:
   • Watch the lectures (2 @ 50 mins): ~2 hours
   • Textbook and background reading: ~2 hours
   • Recitation/discussion video tutorial: ~1 hour
   • Homework problems and exercises: ~2 hours
   • Free study tutorials or reading: 1-2 hours
   • Free study independent projects: 1-2 hours

Let's break this down even further.  For each 50 minute lecture, one should do:
  • 1 hour of reading
  • 30 minutes of recitation/tutorial videos
  • 1 hour of problems or exercises
  • 1 hour of targeted external tutorials
  • 1 hour on your own little project(s)

Assuming you were to devote 90 minutes a day, 3-4 days a week to this project, within 4 months, you will have watched all the lectures from the course, read a couple books, done tens or hundreds of problems, completed a number of tutorials, done a lot of online (re)searching, and created a bunch of your own little programs, putting in 150 hours of work.

Doing 90 minutes a day, 2 days a week, it would take 50 weeks, just under a year, to complete the course.  Doing 60 minutes a day, 3 days a week is the same, of course.    

Doing 90 minutes a day, 3 days a week would take 33 weeks, about 8 months.

Doing 90 minutes a day, 5 days a week would take 20 weeks, or 5 months.

Doing 90 minutes a day, every day, would take 3.5 months. 

Doing 2 hours a day, 3 days a week would take about 6 months. 

Doing 1 hour a day, every day, would take just over 5 months. 

In the next article in this series, I'll detail specific textbooks, video and text-based tutorials, and other assorted learning materials to help put some muscle on the skeleton framework presented in this post.  

See the second article in the series, which covers learning benchmarks for beginner Python programmers.

New Year's Apps: Clock Watchers, Noise Makers and Resolution Keepers

As noted the other day in our post on New Year's apps, New York City's Times Square Alliance is has released a free app that will provide a commercial-free live stream of the Times Square New Year's Eve webcast.  You can check it out on iTunes here.  And AgupieWare's exclusive New Year's Eve Nosie Maker app is also available from the App Store for just $0.99.  Bring the noise!

Over at CNET, Sarah Mitroff  profiles five apps to help keep your New Year's resolutions:
Lose weight, stop smoking, save for a new house, organize your life: Your resolutions are set, and you have every intention of keeping them -- at least until life gets in the way. Don't give up on your goals before February, instead download a few apps that can nudge you in the right direction and coach you to stay on track.

Snapchat Vulnerable to Data Hack

Hackers have made sure that popular photo sharing app Snapchat got a hearty lump of coal for Christmas.  After having its security disclosure go ignored since August, Gibson Security has published Snapchat's previously undocumented developer hooks (API) and code for two exploits that allow mass matching of phone numbers with names and mass creation of bogus accounts.  on the GibSec Twitter account on Christmas Eve — which by time difference is Christmas Day in Australia.
The Australian hackers announced its publication of Snapchat's API and the two exploits 

Target Data Hack Worse than Initially Reported

It's almost like they painted a target on themselves.  Oh wait . . . from the NYT:
After hackers stole credit and debit card records for 40 million Target store customers, the retailer said customers’ personal identification numbers, or PINs, had not been breached. Not so. On Friday, a Target spokeswoman backtracked from previous statements and said criminals had made off with customers’ encrypted PIN information as well.

Two Apps to Ring in the New Year

New York City's Times Square Alliance is has released a free app that will provide a commercial-free live stream of the Times Square New Year's Eve webcast.  You can check it out on iTunes here.

AgupieWare's exclusive New Year's Eve Nosie Maker app is also available from the App Store for just $0.99.  Bring the noise!

How to Scrub Your Online Presence . . .

It is by now common wisdom that once you put something up on the internet, it is there forever, or at least as long as the internet still exists.  However, it is possible to change your digital footprint enough to hide your tracks.  A small primer on doing so from Make Use Of:
If you’re looking to drop from the Webosphere completely in an attempt to remain anonymous, we can help. The process is arduous and there are several key steps you’ll need to take along the way. But in the end, if you value your online privacy, it’ll be worth it . . .

Glenn Greenwald to Speak at Chaos Communication Conference

From ZDNet:
The world's oldest and largest global hacker organization The Chaos Computer Club (CCC) has announced it will open next week's conference, the 30th Chaos Communication Congress (30c3), with a December 27 opening keynote by Glenn Greenwald.

Glenn Greenwald's keynote tops our list of must-see talks at the legendary event. 30C3's schedule shows that the compelling keynote won't be the only explosive presentation at 30C3.

Mr. Greenwald's keynote will be webcast live on this page. If you miss it, all of 30C3's talks will be archived on the offical CCC media website. CCC's archives go online astonishingly fast.

Researchers Hack RSA with Acoustic Cryptanalysis

Many computers emit a high-pitched noise during operation, due to vibration in some of their electronic components. These acoustic emanations are more than a nuisance: they can convey information about the software running on the computer and, in particular, leak sensitive information about security-related computations. In a preliminary presentation, we have shown that different RSA keys induce different sound patterns, but it was not clear how to extract individual key bits. The main problem was the very low bandwidth of the acoustic side channel (under 20 kHz using common microphones, and a few hundred kHz using ultrasound microphones), many orders of magnitude below the GHz-scale clock rates of the attacked computers.

Here, we describe a new acoustic cryptanalysis key extraction attack, applicable to GnuPG's current implementation of RSA. The attack can extract full 4096-bit RSA decryption keys from laptop computers (of various models), within an hour, using the sound generated by the computer during the decryption of some chosen ciphertexts . . .

Tens of Millions of Credit and Debit Cards Compromised in Target Hack

If only there were an alternative global payment processing system, one that did not rely on the shady practices of banks and corporations.  From the Chicago Tribune:
Target Corp said data from about 40 million credit and debit cards might have been stolen from shoppers at its stores during the first three weeks of the holiday shopping season.
The data theft, unprecedented in its ferocity, took place over a 19-day period that began the day before Thanksgiving. Target confirmed on Thursday that it identified and resolved the issue on Dec. 15 . . .

Target said the breach, second-largest hack at a U.S. retailer, might have compromised accounts between Nov. 27 and Dec. 15, a period of nearly three weeks.

China Turns Against Bitcoin: Price Drops

From FT:
China has blocked the country’s Bitcoin exchanges from accepting new inflows of cash, a move that imperils the much-hyped virtual currency in its biggest market.  The head of BTCChina, the world’s largest Bitcoin exchange by trading volume, said he had received word at midday on Wednesday that his platform would no longer be able to accept renminbi from would-be Bitcoin buyers.
The price of Bitcoin has since dropped by 50%.  In related news, the price of Bitcoin is still over 100% higher than it was just a month and a half ago.  

Duolingo: Apple's App of the Year

From the Pittsburgh Post-Gazette:

Apple has named Pittsburgh-based language learning smartphone application Duolingo as the iTunes App Store App of The Year.  Apple announced today that Duolingo, created by Carnegie Mellon University computer science professor Luis Von Ahn, was the editor's choice for 2013 App of the Year. The free iPhone app, described in Apple's App Store as "fantastically well-designed and easy to use," beat out San Francisco-based photo editing app VSCO Cam and San Francisco-based educational game Endless Alphabet.

Judge Finds Dragnet Surveillance "Indiscriminate" and "Arbitrary", Allows It to Continue Anyway

Like the executive and legislative branches of government, the judiciary is an active opponent of basic constitutional rights and liberties in the United States.  Even when judges recognize the dangers posed by government action, they rarely act to stop it.  From Reuters:

The U.S. government's collection of massive amounts of data about telephone calls, a program revealed in June after leaks by former National Security Agency contractor Edward Snowden, is likely unlawful, a judge ruled on Monday.
U.S. District Judge Richard Leon stayed his own ruling pending an expected appeal by the government, but in a significant challenge to U.S. spying authority, he wrote that the program likely violated Americans' right to be free of unreasonable searches.

"I cannot imagine a more 'indiscriminate' and 'arbitrary invasion' than this systematic and high-tech collection and retention of personal data on virtually every single citizen," Leon wrote, citing earlier court precedent.

SteamOS to Released Tomorrow

From Ars Technica:
PC gamers who are champing at the bit to build their very own "Steam Machines" won't have to wait long to start tinkering, as Valve has revealed that its recently announced SteamOS will be available this Friday.
The announcement comes alongside word from Valve that its prototype Steam Machines, along with the companion Steam Controller, will be shipped out to 300 randomly selected US beta testers on Friday. Valve plans to notify the lucky testers via e-mail at 2pm Pacific today, and beta participants will get a special badge on their Steam accounts so journalists and fellow players can start bugging them for their impressions incessantly.

Harlem to Become Nation's Largest Public Wifi Zone

Mayor Michael R. Bloomberg today announced the launch of a new outdoor
public WiFi network in Harlem accessible to all users at no cost. The Harlem WiFi network will extend 95 city blocks, from 110th to 138th Streets between Frederick Douglass Boulevard and Madison Avenue making it the largest continuous free outdoor public wireless network in the nation. The network, which will be rolled out in three phases in coordination with the city’s Technology Development Corporation and the Department of Information Technology and Telecommunications, will increase digital access for approximately 80,000 Harlem residents, including 13,000 public housing residents, as well as businesses and visitors in the area.
The free public network will serve the community for an initial five-year term and is funded through a generous donation from the Fuhrman Family Foundation to the Mayor’s Fund to Advance New York City. The first phase, extending from 110th to 120th Streets between Madison Avenue and Frederick Douglass Boulevard, is underway and the remaining phases will be complete by May 2014. The Mayor was joined at the announcement by Chief Information and Innovation Officer Rahul Merchant, Glenn and Amanda Fuhrman, Mayor’s Fund to Advance New York City President Megan Sheekey, Chief Digital Officer Rachel Haot, New York City Housing Authority Chairman John Rhea and Harlem Children’s Zone President and Chief Executive Officer Geoffrey Canada.
“Our new Harlem wireless network brings critical connectivity to residents and visitors, giving them 24/7 access to everything from education materials for kids, to information about Harlem’s rich history and attractions, to everyday needs like paying bills, checking library hours – or even just keeping tabs on the Knicks and Nets,” said Mayor Bloomberg. “In 2013 being successful requires being connected; thanks to the Fuhrman Family Foundation and the Mayor’s Fund, we are wiring nearly 100 blocks in Harlem and giving 80,000 New Yorkers another tool for success.”

Big Business and Big Government: Dragnet Surveillance Already the Norm from the FBI to the Local Police

If only there were some kind of document that outlined the established powers of government, and provided for reasonable and rational limits to what that government is legally allowed to do, and if only it were faithfully enforced and adhered to, we would live in a very different world. The war on the Fourth Amendment continues apace.  From Wired:
The nation’s mobile phone carriers received more than 9,000 requests last year for cell-tower dumps, which identify every mobile phone at a particular location and time, often by the thousands.

The revelation, revealed in a congressional inquiry, underscores that domestic authorities, from the FBI to the local police, are performing a massive amount of surveillance on Americans on domestic soil, sometimes without probable-cause warrants.

Figures provided by the nation’s largest carriers, T-Mobile, Sprint, Verizon and AT&T, and smaller companies, like C-Spire and Cricket, show that the carriers overall got as many as 1.1 million requests for customer cellular data last year. They’ve earned tens of millions of dollars processing the data, the records show. . . .

But the most startling figures show that the authorities are obtaining information on the whereabouts of perhaps thousands of people at once, often by a judge’s signature based on assurances from the authorities that the data is relevant to an investigation.

Tech Firms Call for International Ban on Dragnet Surveillance

From the Guardian:
The world's leading technology companies have united to demand sweeping
changes to US surveillance laws, urging an international ban on bulk collection of data to help preserve the public's “trust in the internet”.
In their most concerted response yet to disclosures by the National Security Agency whistleblower Edward Snowden, Apple, Google, Microsoft, Facebook, Yahoo, LinkedIn, Twitter and AOL have published an open letter to Barack Obama and Congress on Monday, throwing their weight behind radical reforms already proposed by Washington politicians.
“The balance in many countries has tipped too far in favour of the state and away from the rights of the individual – rights that are enshrined in our constitution,” urges the letter signed by the eight US-based internet giants. “This undermines the freedoms we all cherish. It’s time for change.”

"Don't Go Fishing While Your House is on Fire" and Other Go Proverbs for Bitcoiners

It would be interesting to find out if there are many Go players in the Bitcoin community.  As a casual Go (i.e. Baduk) player, I often find that traditional proverbs on the game's strategy and tactics are applicable to other aspects of life, the world and everything. And that includes Bitcoin.  So I thought I'd share some Go proverbs that may be helpful to other Bitcoiners out there.  Here are nine Go proverbs and some thoughts on their application to Bitcoin.  You can find more Go proverbs over at Sensei's Library.

"If it has a name, know it."

In Go, this of course does not mean that we should just pick up some fancy jargon and start throwing it around. Rather, the idea is that if something is important or common enough to have a name, you should know what that thing is, and study it – whether it is an opening move, a pattern, a trade-off, or a protocol.  One of the more interesting aspects of Bitcoin is that it requires a non-trivial amount of inquiry to gain a basic understanding of what Bitcoin is, how it works and how to use it, let alone how to improve it.  For the average person, there are a lot of new things to learn or understand before you can comfortably and competently navigate the conceptual and practical aspects of Bitcoin, same as on the Go board.  Simply put, this means: do your research and your due diligence!

"Lose your first 50 games as quickly as possible."

There is a significant learning curve to Go, but you can learn all the rules in a few minutes.  You are going to make beginner mistakes (sometimes even the pros make them!).  It is better to make those mistakes quickly, in a low stakes environment, and learn from them.  With respect to Bitcoin, just think of how many people have gotten tripped up by the way in which the original client handles the change from one address when you make a fractional transfer to another!  If only they had tested the waters early on with a small transaction, they wouldn't have been caught off guard when there was more on the line. 

"Play urgent moves before big moves."

In Go, it is a grave error to attack a strong position from a weak base, or to expand to new territory before consolidating your current position.  Build your defenses before you go on the attack.  Planning on buying a bunch of bitcoin? or moving a bunch of currency around? or investing a ton of money in hardware?  Make sure you've got a strong and secure base from which to make your move.  Secure your wallet. 

"Don't go fishing while your house is on fire."

This is a more colorful version of the previous proverb, but the redundancy emphasizes the importance of the lesson.  Make sure your base is covered before taking off on flights of fancy!  Consider also that the study and research advised in the first proverb above are themselves necessary to properly secure your base in practice.

"A rich man should not pick quarrels." 

On the Go board, this means if you find yourself in a strong position with a big lead, don't take needless risks at your opponent's expense or your own.  Others will react violently when their survival is threatened, and you may inadvertently risk your own survival by opening yourself up to attack.

"The greedy do not get success."

This proverb is closely related to the previous one, and again re-enforces the lesson.  The notion of greed is a central concept in the psychology of Go.  Greed can cloud one's judgment and cause an otherwise rational person to make rash decisions or take excessive and needless risk with little forethought.  Don't invest more than you can afford to lose.

"Sacrifice plums for peaches."

In Go, it is not wise to be greedy, but you still have to take profit if you want to come out ahead.  And oftentimes you have to sacrifice something – big or small – to get something more in return, or to get anything at all. 

"Use go to meet friends."

Visit your local go club, meet new people and learn from them, and teach people in your circle of friends.  Check out your local Bitcoin meetup group or start one yourself.

"Don't follow proverbs blindly."

This meta-proverb is one of my favorites.  Don't be rigid in your thinking or in your play.  Always be skeptical and think for yourself!

Any other Go playing Bitcoiners or Bitcoining Go players out there?  What are your favorite Go proverbs?

The Threat of Government

The longer a government views people in general and its citizens in particular as a threat, the more people will come to understand that government is a threat to them.  From ZDNET:
While Microsoft's recent move to encrypt user data made the most headlines, the reasoning underlying its new data protection strategies classify the US government in the same category as a cyber-criminal group.
Brad Smith, Microsoft's EVP of Legal and Corporate Affairs, labeled the American government as an "advanced persistent threat" in a December 4 post on The Official Microsoft Blog.
The term advanced persistent threat (APT) refers to an attacker, usually an organized group of malicious attackers, that should be considered harmful and dangerous — and an overall method of attack that plays a "long game."

Two Major Internet Data Breaches

Someone's been rerouting traffic from the internet information fire hose.  From Wired:
In 2008, two security researchers at the DefCon hacker conference demonstrated a massive security vulnerability in the worldwide internet traffic-routing system — a vulnerability so severe that it could allow intelligence agencies, corporate spies or criminals to intercept massive amounts of data, or even tamper with it on the fly.
The traffic hijack, they showed, could be done in such a way that no one would notice because the attackers could simply re-route the traffic to a router they controlled, then forward it to its intended destination once they were done with it, leaving no one the wiser about what had occurred.
Now, five years later, this is exactly what has occurred. Earlier this year, researchers say, someone mysteriously hijacked internet traffic headed to government agencies, corporate offices and other recipients in the U.S. and elsewhere and redirected it to Belarus and Iceland, before sending it on its way to its legitimate destinations. They did so repeatedly over several months. But luckily someone did notice.
What the surveillance state security hysterics fail to understand is that any breach of informational security in the name of security makes everyone less secure on the internet. In related news, 2 million passwords have been compromised from some of the biggest names in the tech industry:
Hackers have stolen usernames and passwords for nearly two million accounts at Facebook, Google, Twitter, Yahoo and others, according to a report released this week.

The massive data breach was a result of keylogging software maliciously installed on an untold number of computers around the world, researchers at cybersecurity firm Trustwave said. The virus was capturing log-in credentials for key websites over the past month and sending those usernames and passwords to a server controlled by the hackers.

FCC Chair Open to Class-Based Internet Access

From Public Knowledge:
Yesterday, new FCC Chairman Tom Wheeler delivered his first formal public address.  After a prepared speech that explained his regulatory approach, he moved to a Q&A session.  In that session, he appeared to endorse the opposite of net neutrality: allowing ISPs to charge websites and services in order to reach that ISP’s subscribers.   In other words, giving ISPs the power to pick winners and losers online.

French Government Seeks Powers for Live Dragnet Internet Surveillance

From CIO:
A wide variety of government officials could gain access to live data concerning users of ISPs and online services including content-hosting sites, without the approval of a judge, under a draft law approved by members of the French National Assembly on Friday.

The measure, a rider on the 2014-2019 defense appropriation bill, would require ISPs and content hosting companies to provide government officials with access to details of their users' activity without judicial oversight. Law enforcement officials can already ask a judge for an order to access such data.
If the bill becomes law, it will no longer be necessary to go via the courts to obtain such access, and the number of government officials who could access the data would be much broader, potentially including those responsible for collecting taxes.

Tech Firms Work to Counter Appearance of Impropriety in Dragnet Surveillance

From USA Today:
Google, Facebook, Microsoft and Twitter are engaged in a costly tech arms race, with their businesses and cultures at stake. Not against one another, mind you, but a common foe: the National Security Agency.

The tech juggernauts are investing in security technology, lobbying efforts and good old-fashioned PR to thwart U.S. government snooping of their data systems, often without their cooperation or knowledge.

For months, the narrative has focused on data breaches and spying as tech's biggest players quietly stewed over a sense of government betrayal, while assessing threats to their brands because of consumer outrage over invasion of their privacy.