2011/2012 A Boom Year For Online Education

Below is one post comment to an Interesting article in wired Science Magazine:  The Stanford Education Experiment Could Change Higher Learning Forever

Yes this is a big deal. 2011/2012 is a boom year for online education, we are finally fulfilling the potential of the internet. The 2000s have been to a small extent a period where we saw the rise of “big data” (http://en.wikipedia.org/wiki/B… ) in the 2010s we will see that rise change our lives. Udacity/MITx/Coursera/KhanAcademy are building the big dataset we need to analyse and improve.

Just pause to think what say Google could do if it had detailed data and statistics about how people learn say Algebra or Quantum Mechanics, right down to the individual click.

If there is *any* fruit left on the tree of better educational theory and practice, this is how we will get it.

Very well said ; and very interesting to monitor the progress of this new trend of free online education.

Important free online education programs:

  1. Udacity
  2. MITx
  3. Coursera
  4. Khan Academy

The Most Ancient Marketing

The Most Ancient Marketing | December 2011 | Communications of the ACM.

The Most Ancient Marketing

[article image] Credit: Gluekit / Photograph by AP Photo / Paul Sakuma

Before Apple, Steve Jobs famously went to India with his college friend Dan Kottke. While I never had occasion to talk to Jobs about it, I did hear many a tale from Kottke, and I have a theory I wish I had a chance to try out on Jobs.

Jobs loved the Beatles and referred to them fairly often, so I’ll use some Beatles references. When John Lennon was a boy, he once recalled seeing Elvis in a movie and suddenly thought to himself, “I want that job!” The theory is that Jobs saw gurus in India, focal points of love and respect, surrounded by devotees, and he similarly thought to himself, “I want that job!”

This observation is not meant as a criticism, and certainly not as an insult. It simply provides an explanatory framework for what made Jobs a unique figure.

For instance, he liberally used the guru’s tactic of treating certain devotees badly from time to time as a way of making them more devoted. I heard members of the original Macintosh team confess that they succumbed. They were tangibly stunned by it, repeatedly. They recognized it happening in real time, and yet they consented. Jobs would scold and humiliate people and somehow elicit an ever more intense determination to attempt to win his approval, or more precisely, his pleasure.


Jobs imported the marketing techniques of India’s gurus to the business of computation.


The process is described in an essay by Alan Watts on how to be a guru that was well known around the time Apple was first taking off. The successful guru is neither universally nor arbitrarily scornful to followers, but there should be enough randomness to keep them guessing and off guard. When praise comes, it should be utterly piercing and luminous, so as to make the recipient feel as though they’ve never known love before that moment.

Apple’s relationship with its customers often followed a similar course. There would be a pandemic of bleating about a problem, such as a phone that lost calls when touched a certain way, and somehow the strife seemed to further cement customer devotion instead of driving them away. What other tech company has experienced such a thing? Jobs imported the marketing techniques of India’s gurus to the business of computation.

Another way in which Jobs emulated the practices of gurus is in the psychology of pseudo-asceticism.

Consider the way he used physical spaces. Jobs always created personal and work spaces that were spare like an ashram, but it is the white Apple store interior that most recalls the ashram. White conveys purity, a holy place beyond reproach. At the same time, the white space must be highly structured and formal. There must be a tangible aura of discipline and adherence to the master’s plan.

The glass exteriors and staircases of elite Apple stores go further. They are temples, and I imagine they might someday be repurposed for use along those lines. (Maybe, some decades from now, our home 3D printers will just pop out the latest gadgets, leaving stores empty.)

There is yet another Beatles reference to bring up: It was Yoko Ono who first painted a New York City artist’s loft white. Conceptual avant-garde art invites people to project whatever they will project into it, and yet the artist offering a white space, or the silence of John Cage’s “4’33″” still becomes well known. This is the template followed by Apple marketing.

A dual message is conveyed. The white void is empty, awaiting you and almost anything you project into it. The exception is the surrounding institution—the business—which is not something to be projected away.

While that setup might seem to only benefit the establishment offering the white space, there is actually a benefit to the visitor who projects what they will into it. It’s like a good parent or lover who will listen endlessly without complaint but also sets boundaries. Narcissism can then be indulged without the terror of being out of touch or out of control. This formula is a magnet for human longings.

It’s all about you, iThis and iThat, but we will hold you, so you won’t screw yourself up. Of course, that’s not really a possible bargain. To the degree you buy into the ashram, you do give up a certain degree of yourself. Maybe that’s not a bad thing. It’s like how Apple customers experience culture in general through the lens of Apple curation whenever they use a tablet. Maybe it’s the right mix for some people. But one ought to be aware.

It’s tempting to ridicule this aspect of Job’s legacy, but everything people do is infused with some degree of duplicity. This is doubly true of marketing.

Putting the duplicity up front might be best. Back to the Beatles: Lennon’s “Sexy Sadie” ridiculed the guru shtick, while McCartney’s “Fool on the Hill” praised it, and they were singing about the same guru. These two songs could well be applied to the appeal of Apple under Jobs. Yes, he manipulated people and was often not a nice guy, and yet he also did either elicit or anticipate the passions of his devotees, over and over. (No one can say what the mix of eliciting versus anticipating really was.)

Jobs didn’t just use pseudo-asceticism for marketing. He wielded purist fanaticism so as to have power in the world of nerds. This is how it came to be that Jobs is so often remembered as an “inventor,” though he rarely was one. His genius was not technical, but he was a genius at manipulating technical minds.

An example is Jobs’ obsession with engineering beautiful fonts into personal computers. While plenty of people wanted this (Don Knuth comes to mind), it wasn’t easy to make such a luxury into a high-priority item in the engineering culture that drove early PC companies. But Jobs often mentioned his pride at having done it.

It is perhaps surprising that so few figures in tech companies have been able to push engineers around enough to enforce principles of elegance and simplicity, as understood by non-engineers. Apple’s commercial success has created a better atmosphere for such things in all the companies. But how did Jobs do it in the first place?

My impression, based on a number of interactions I witnessed over many years, is that Jobs traded one form of obsessive, principled nerdiness against another. It was useless for a typical designer or marketing person to plead with engineers during the early years of personal computers. Engineers had airtight criteria and data, and that trumped mere opinions and intuitions. But Jobs didn’t plead. He declared even more rigid and exacting criteria.

Jobs won the arms race of control freakery. He remains the only figure in a non-engineering role I have ever seen win this race against engineers outright.

Author

Jaron Lanier is Partner Architect, Microsoft Research, and Innovator in Residence, USC Annenberg School.


Copyright held by author.

The Digital Library is published by the Association for Computing Machinery. Copyright © 2011 ACM, Inc.

Google ClientLogin Utility in Java

Authentication and Authorization for Google APIs is a common feature in today’s applications requiring integration and information exchange with Google services. while most of this Google authentication process is tailored for web applications, it is also available for desktop and installed applications. for Desktop applications Google recommends using an authentication method called ClientLogin.

ClientLogin method Caution:
Google no more recommands using ClientLogin method for Authorization. here is a quote from google documentation:

ClientLogin is a Google proprietary authorization API, available as an alternative to OAuth for most Google APIs. You should avoid using ClientLogin if possible. If you already have applications that use ClientLogin, you should migrate to OAuth or the hybrid protocol.

Thus, ClientLogin is for use only when there is a high level of trust between the application and the owner of the protected data. It is mostly commonly recommend for cases where the application owns the protected data. If users of your application are worried about supplying their passwords for security and privacy reasons then ClientLogin authorization method is not suited for this situation.

How ClientLogin authorization works?
The ClientLogin method works mainly by sending HTTP Post requests to Google service using specific parameters as described in Google documentation. In this article we will use a different approach to implement ClientLogin authorization process. We will use Google APIs Client Library for Java, which is a powerful java library for accessing Google’s HTTP-based API’s on the web. The most important class in this library is , Obviously, the ClientLogin class.

Anatomy of the ClientLogin class:
ClientLogin class provides a single method authenticate() which handles the details of authentication process. it also provides an important internal class ErrorInfo which could be used to handle authentication errors and captcha challenge logic.
In this post we present a clean wrapper class for ClientLogin which handles the complete ClientLogin authorization process including authentication errors parsing and captcha challenge handling.

google-api-java-client Maven Dependencies:
we chose to use maven for building our project example. Maven provides dependencies for the Google APIs Client Library for Java. just add the following maven dependencies to your pom.xml file:

 <dependency>
      <groupId>com.google.api.client</groupId>
      <artifactId>google-api-client-googleapis-auth-clientlogin</artifactId>
      <version>1.2.3-alpha</version>
    </dependency>
    <dependency>
    <groupId>com.google.api.client</groupId>
    <artifactId>google-api-client-javanet</artifactId>
    <version>1.2.3-alpha</version>
  </dependency>

after that use maven:install to install the required jars to be included in our project classpath.

GoogleClientLogin wrapper class:
Our wrapper class obviously contains a reference to ClientLogin . it provides public methods implementing the important functions of the authentication process.
GoogleClientLogin has a constructor that takes a String representing the Google service you’re requesting authorization for ( for example “cl” for Google Calendar). The constructor looks like this:

/**
	 * @param service
	 */
	public GoogleClientLogin(String service) {
		super();
		this.service = service;
		authenticator = new ClientLogin();
		transport = GoogleTransport.create();
		authenticator.authTokenType = service;
	}

The main method is authenticate(username,password) that takes two arguments representing the username and password input by user:

/**
	 * @param username
	 * @param password
	 * @throws ClientLoginException
	 */
	public void authenticate(String username, String password)
			throws ClientLoginException {

		try {

			// authenticate with ClientLogin
			authenticator.username = username;
			authenticator.password = password;
			Response response = authenticator.authenticate();
			this.authToken = response.auth;

		} catch (HttpResponseException e) {
			parseError(e);

		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

this method sets ClientLogin variables (username and password) then calls ClientLogin.authenticate() which returns a Response instance. if the ClientLogin.authenticate() call is successful we store the Authentication token ‘Response.auth’. The advantage of the authenticate(username,password) wrapper method is its intelligent handling of authentication errors.

Parsing Authentication errors:
We distinguish two Error categories that could be thrown during the call to Clientlogin.authenticate(): a-unrecoverable Errors for which we use a ClientLoginException class
b-a recoverable error thrown when Google service requires a captcha challenge. for this later we use a separate Exception class CaptchaRequiredException which extends the first ClientLoginException class.
Clientlogin.authenticate() throws a HttpResponseException if the authentication response has an error code. we provide a helper method for parsing this exception class as follows:

/**
	 * @param e
	 * @throws ClientLoginException
	 */
	private void parseError(HttpResponseException e)
			throws ClientLoginException {
		try {

			ClientLogin.ErrorInfo errorInfo = e.response.parseAs(ClientLogin.ErrorInfo.class);
			errorMessage = errorMsg.get(errorInfo.error);
			if (errorInfo.error.equals(CaptchaRequired)) {
				captchaToken = errorInfo.captchaToken;
				captchaUrl = errorInfo.captchaUrl;
				throw new CaptchaRequiredException(errorMessage, e);

			} else
				throw new ClientLoginException(errorMessage, e);
		} catch (IOException e1) {

			throw new ClientLoginException(e1);
		}
	}

we Call HttpResponseException.response.parseAs(ClientLogin.ErrorInfo.class) to parse the response. if the error code is “CaptchaRequired” we store errorInfo.captchaToken and errorInfo.captchaUrl then throw CaptchaRequiredException. for the rest of Error codes we just throw ClientLoginException.

Authentication with CAPTCHA Challenge:
in the case of a CAPTCHA challenge we provide a second authenticate() method which provides an extra argument ‘captchaAnswer’ representing the captcha key entered by user during a CAPTCHA challenge:

/**
	 * @param username
	 * @param password
	 * @param captchaAnswer
	 * @throws ClientLoginException
	 */
	public void authenticate(String username, String password,
			String captchaAnswer) throws ClientLoginException {
		authenticator.username = username;
		authenticator.password = password;
		authenticator.captchaToken = this.captchaToken;
		authenticator.captchaAnswer = captchaAnswer;
		try {
			Response response = authenticator.authenticate();
			this.authToken = response.auth;
		} catch (HttpResponseException e) {
			parseError(e);
		} catch (IOException e) {
			throw new ClientLoginException(e);
		}
	}

before calling authenticator.authenticate() this method sets two extra fields authenticator.captchaToken and authenticator.captchaAnswer. Error handling for this method is the same as the main authenticate(username,password) method.
Finally we provide a method to retrieve the CAPTCHA image that will be displayed to user:

/**
	 * @return the captchaImage
	 */
	public BufferedImage getCaptchaImage() {

		BufferedImage image = null;
		try {
			URL url = new URL("https://www.google.com/accounts/"+ getCaptchaUrl());
			image = ImageIO.read(url);
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;

		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}

		return image;
	}

You can view the complete GoogleClientLogin class source file here.

Testing GoogleClientLogin wrapper class:
GoogleClientLoginDialog is a swing Dialog which presents an example of how to use GoogleClientLogin wrapper class. It provides a feature to force Google service to send a CAPTCHA challenge. we implement this test using a thread that keeps sending random passwords until Google responds with a CAPTCHA challenge:

 private class ForceCaptchaRunnable implements Runnable{

		public void run() {
			Random r = new Random();
			boolean isCaptcha = false;
			while (!isCaptcha) {
				try {
					client.authenticate(textField.getText().trim(),
							passwordField.getText().trim()+ r.nextInt(100));
					showMessage("Auth Token: "+client.getAuthToken());
				} catch (CaptchaRequiredException e1) {

					isCaptcha = true;
					showCaptcha(true);

				} catch (ClientLoginException e1) {

				}
			}

		}

	}


Source code: