Thursday, June 23, 2011

CoffeeScript - JavaScript done right

CoffeeScript main site

Book: CoffeeScript: Accelerated JavaScript Development @ PragProg

Video: CoffeeScript Basics Video @

Podcast: Trevor Burnham on CoffeeScript @ Herding Code

CoffeeScript is a little language that compiles into JavaScript. Underneath all of those embarrassing braces and semicolons, JavaScript has always had a gorgeous object model at its heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.

The golden rule of CoffeeScript is: "It's just JavaScript". The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. You can use any existing JavaScript library seamlessly (and vice-versa). The compiled output is readable and pretty-printed, passes through JavaScript Lint without warnings, will work in every JavaScript implementation, and tends to run as fast or faster than the equivalent handwritten JavaScript.

# Assignment:
number   = 42
opposite = true

# Conditions:
number = -42 if opposite

# Functions:
square = (x) -> x * x

# Arrays:
list = [1, 2, 3, 4, 5]

# Objects:
math =
root:   Math.sqrt
square: square
cube:   (x) -> x * square x

# Splats:
race = (winner, runners...) ->
print winner, runners

# Existence:
alert "I knew it!" if elvis?

# Array comprehensions:
cubes = (math.cube num for num in list)

Wednesday, June 22, 2011

Enabling Google Toolbar with Firefox 5, 6, 7....

Firefox 5 Available for Download

The magic of open market competition...

Just three months after the release of Firefox 4, Mozilla has pushed out Firefox 5 for the desktop and Android devices.

That’s a big change from the two years it took to move from Firefox 3.5 to Firefox 4. Firefox 5 is part of Mozilla’s new rapid release development cycle. This cycle, which is more akin to what Google does with its Chrome browser, promises faster, more iterative updates.

But there is a problem: Google toolbar does not support FF5 yet (3 months later!)
No conspiracy, Google engineers are just busy with Chrome :)

And there is a solution.

Thats because the old installed version of googletoolbar has a file named install.rdf that declares the max supported version of firefox to be 4.0.

To fix this ,just open the install.rdf file with notepad and change maxVersion from 4.0.* to 6.* (see the image i've also uploaded)

Now, in order to find the correct install.rdf file do the following:
Go to folder : \Users\[your user name here]\AppData\Roaming\Mozilla\Firefox\Profiles\[sometext].default and search for the install.rdf file (Windows 7)
\Documents and Settings\[username]\Application Data\Mozilla\Firefox\Profiles (Windows XP)

Windows search will find many install.rdf files (one for each addon you have installed on firefox) so make sure that you find the install.rdf that has the line
Google Toolbar for Firefox in it.

For this install.rdf file just rename the max version as stated above , restart firefox...! "et voila" Google toolbar is back!

Update September 2011: Firefox 7 has arrived,
and Google still didn't change that one character in config file for toolbar
that is needed to make it work with new Firefox browsers!
No conspiracy, just too busy with Chrome :)

Sunday, June 19, 2011

Apple defines the "post-pc era"

In the post-pc era, Apple set to rule

"'Apple has created a company the size of EMC in one year' if iPad were its own company,' Bernstein's Stacy Rasgon told investors.

On top of that, the market is set to get even bigger.

Analysts expect perhaps 215 million units being sold in 2015, for a compounded annual growth rate of 66 percent.

Consumer interest is 'staggering,' Bernstein said, with 20 percent of individuals surveyed by the firm saying they'll buy a tablet in the next 12 months

For technology insiders, this is even more interesting phenomenon.

The "tablets" did exist for at least 10 years,
and Apple is using 20+ year old language (Objective-C),
build on top of an open source OS (Free BSD)
and open source web browser (WebKit)...

So it is not (just) about "a big idea",
it is the "perfect execution" that makes the difference.

Now, this is a new reality, and everybody will adjust to it,
one way or another... The future with connected (computing) devices...

There is still plenty of space for innovation:
* even smaller devices, with no screen at all, but speakers and projector
* even bigger devices, "apps" for TVs
* even smarter and faster devices, that will leverage the "cloud"
* even cheaper device, where most of "smarts" is in the cloud
* even more engaging devices, with 3D screens, and tactile interfaces...
* even more useful devices, leveraging "social knowledge" all the time

New iPad 2 Ad Pushes All the Right Buttons [VIDEO]

“Now, we can
watch a newspaper,
listen to a magazine,
curl up with a movie,
see a phone call.

We can
take a classroom anywhere,
hold an entire bookstore,
and touch the stars.

Because now,
there is this”

New iPad 2 Ad Pushes All the Right Buttons + a gallery of 10 Vintage Mac Ads

It’s an art. Apple’s good at it...

Monday, June 13, 2011

Apple Puts the Cloud into All Its Devices - Technology Review

Apple Puts the Cloud into All Its Devices - Technology Review

"Apple's Steve Jobs extended his company's technology in a new direction today by announcing iCloud, a service that means music, photos, and documents saved onto an Apple device will soon appear almost instantly on any other Apple product that a person owns.

'Apple's iCloud works in the background to keep music, photos, and documents in sync across all Apple devices, mobile or otherwise,' said Jobs. He announced the new service at the annual WWDC conference, an event aimed at developers who create software for Apple products. New versions of Apple's desktop and mobile operating systems, OS X Lion and iOS 5, respectively, will contain iCloud and move it to the heart of the company's. Lion is to be released next month and iOS in the fall.

Contrary to many expectations, iCloud will not make it possible for people to stream music purchased on iTunes over the airwaves from any device—leaving it short of a feature found in recently launched services from Amazon and Google. However, iCloud's capabilities extend beyond music and will become a central feature of all Apple products. Apple's previous cloud service, MobileMe, 'no longer exists as a product,' said Jobs."

Using Wi-Fi for Navigating the Great Indoors - Technology Review

Using Wi-Fi for Navigating the Great Indoors - Technology Review

A phone can locate you indoors to within a few paces by combining Wi-Fi signals and the jolt of your footsteps.

Android or Windows? Now You Don't Have to Choose - MIT Technology Review

Android or Windows? Now You Don't Have to Choose - MIT Technology Review

A startup lets smart-phone apps run as fast as normal on a PC or laptop.

Saturday, June 11, 2011

Lockheed Martin Bets Big on Quantum Computing | PCWorld

Lockheed Martin Bets Big on Quantum Computing | PCWorld

It used to be that computers work with 1s and 0s... Not anymore.
Now it can be 0, 1, anything in-between, or 0 and 1 at the same time...

"D-Wave says quantum computers can be used to solve hard problems that ordinarily take too long even for supercomputers. Some examples: Financial risk analysis, object recognition in images, computer vision, and bioinformatics -- the types of analytical thinking that people are good at, but computers find difficult."

After recent security breach, that caused Lockheed Martin to reset password for all employees, this new technology with promise of "quantum leap" in speed could be helpful...

We just need to figure out super complex quantum world and how to program quantum devices.

"qubit", the fundamental building block of quantum computers

Apparently Google is already using (or testing) this technology...

Google Demonstrates Quantum Algorithm Promising Superfast Search

Here is a fascinating interview with David Deutsch, Oxford don who’s been called the founding father of quantum computing.

@OnPoint Radio

...For eons, little changed on this planet, he says. Progress was a joke. But once we got the Enlightenment and the scientific revolution, our powers of inquiry and discovery became infinite. Without limit...

Google, Microsoft, and Yahoo Team Up to Advance Semantic Web - Technology Review

Google, Microsoft, and Yahoo Team Up to Advance Semantic Web - Technology Review

"The three big Web companies launched the initiative, known as, last week. It defines an interconnected vocabulary of terms that can be added to the HTML markup of a Web page to communicate the meaning of concepts on the page."

Thursday, June 09, 2011

Steve Jobs Presents new Apple building to the Cupertino City Council (6/7/11)

Steve Jobs presentation about new Apple building... like spaceship landed...
A single building for for 12000 people... 90% less parket

"...the word spectacular would be an understatement..."

YouTube - Steve Jobs Presents to the Cupertino City Council (6/7/11)

Apple 'Spaceship' campus site special to Steve Jobs due to HP connection

"So we've got a plan that lets us stay in Cupertino. And we went out and we bought some land and this land is kind of special, to me.

When I was 13, I think, I called up –- Hewlett and Packard were my idols –- and I called up Bill Hewlett, 'cause he lived in Palo Alto and there were no unlisted numbers in the phone book, which gives you a clue to my age.

And he picked up the phone and I talked to him and I asked him if he'd give me some spare parts for something I was building called a frequency counter. And he did, but in addition that, he gave me something way more important -- he gave me a job that summer.

A summer job at Hewlett-Packard, right here on -- in Santa Clara, right here off 280, the division that built frequency counters.

And I was in heaven.

Well, right around that exact moment in time, Hewlett and Packard themselves were walking on some property over here in Cupertino, in Pruneridge, and they ended up buying it.

And they built their computer systems division there. And as Hewlett-Packard has been shrinking lately, they decided to sell that property and we bought it.

We bought that and we bought some adjacent property that all used to be apricot trees, apricot orchards and we've got about 150 acres.

And we would like to put a new campus on that so that we can stay in Cupertino.

And we've come up -- we've hired some great architects to work with, some of the best in the world, I think. And we've come up with a design that puts 12,000 people in one building.

When you think about that, that's rather odd. 12,000 people in a building, in one building. But, we've seen these office parks with lots of buildings and they get pretty boring pretty fast. So, we'd like to do something better than that."

"I think what we're going to end up doing is making the energy center our primary source of power, because we can generate power with natural gas and other ways that can be cleaner and cheaper, and use the grid as our backup," Jobs said. "We think that makes more sense."

Saturday, June 04, 2011

How Nokia Fell from Grace - BusinessWeek

How Nokia Fell from Grace - BusinessWeek

What was the most successful European company of the 1990s? Easy: Nokia (NOK).

Now, what's the most disappointing company of the 2000s? Easy again: Nokia.