Saturday, May 28, 2011

Free eBook "Agile Results", the rule of 3

Getting Started with Agile Results - Getting Results | The Book

The Book

Key 1. The Key to Time Management Is Energy Management
Key 2. The Key to Energy Management Is Passion
Key 3. The Key to Results Is Time, Energy and Technique

Pile of debt would stretch beyond stratosphere | Reuters

Pile of debt would stretch beyond stratosphere | Reuters

* United States borrows about $125 billion per month. With that amount, the United States could buy each of its more than 300 million residents an Apple Inc iPad.
That is: an iPad for every person in the US EVERY MONTH!

* The U.S. government borrows more than $40,000 per second. That's more than the cost of a year's tuition, room and board at many universities.

* In one hour, the United States borrows about $168 million, more than it paid to buy Alaska in 1867, converted to today's dollars.

* In two hours, the United States borrows more than it paid France for present-day Arkansas, Missouri, Iowa and the rest of the land obtained by the 1803 Louisiana Purchase.

* The net worth of Bill Gates, roughly around $56 billion, could only cover the deficit for 15 days," said Jason Peuquet, a policy analyst with the Committee for a Responsible Federal Budget. "The net worth of Warren Buffet, roughly around $50 billion, could only cover the deficit for 13 days.

Friday, May 27, 2011

Google Chrome: infinite versions and updates

Another fascinating story from Jeff Atwood,
(a man who created Stack Overflow, with a help from his friends...)
Coding Horror: The Infinite Version

Chrome's version number has been changing so rapidly lately that every time someone opens a Chrome bug on a Stack Exchange site, I have to check my version against theirs just to make sure we're still talking about the same software.
And once -- I swear I am not making this up -- the version incremented while I was checking the version.

Chrome is so fluid that it has transcended software versioning altogether.
Chrome Updates
Rather then push put a whole new 10MB update [for each version], we send out a diff that takes the previous version of Google Chrome and generates the new version. We tried several binary diff algorithms and have been using bsdiff up until now.
We are big fans of bsdiff - it is small and worked better than anything else we tried.

But bsdiff was still producing diffs that were bigger than we felt were necessary.
So we wrote a new diff algorithm that knows more about the kind of data we are pushing
- large files containing compiled executables.
Here are the sizes for the recent 190.1 -> 190.4 update on the developer channel:

Full update: 10 megabytes
bsdiff update: 704 kilobytes
Courgette update: 78 kilobytes

Thursday, May 26, 2011

"Chaos Monkey" helping keep Cloud Services running

Recent hot news was that Netflix has become #1 user of internet bandwidth.
Another recent new was that one of data centers of Amazon Web Service EC2,
otherwise a great service, was down for a few DAYS.
Netflix is apparently using AWS, and it didn't slow its hunger for bandwidth.

"Chaos Monkey" is helping them...
Coding Horror: Working with the Chaos Monkey

We’ve sometimes referred to the Netflix software architecture in AWS as our Rambo Architecture. Each system has to be able to succeed, no matter what, even all on its own. We’re designing each distributed system to expect and tolerate failure from other systems on which it depends
One of the first systems our engineers built in AWS is called the Chaos Monkey. The Chaos Monkey’s job is to randomly kill instances and services within our architecture. If we aren’t constantly testing our ability to succeed despite failure, then it isn’t likely to work when it matters most – in the event of an unexpected outage...

Similar story, here is another reason why Stock Overflow is a great web site.
They had a long-running problem with network, that was used as an opportunity
for improvement...

Every week that went by, we made our system a tiny bit more redundant, because we had to. Despite the ongoing pain, it became clear that Chaos Monkey was actually doing us a big favor by forcing us to become extremely resilient. Not tomorrow, not someday, not at some indeterminate "we'll get to it eventually" point in the future, but right now where it hurts.

A wisdom quote:
That which does not kill us makes us stronger.
- Friedrich Nietzsche

Monday, May 23, 2011

Apple Store 2.0 - iPad info terminals

What does Apple Store 2.0 look like? | Companies News - Betanews
"Basically, every product in Apple Store now has its own iPad bearing additional information, interactively. The paper placards are gone..."

Saturday, May 21, 2011

Why Mobile Apps Will Soon be Dead - MIT Technology Review

Why Mobile Apps Will Soon be Dead - MIT Technology Review

"One word: distribution. There are 2 billion web users versus 50 million iOS users."
- Brian Kennish, formerly an engineer at Google

download a free copy of Angry Birds for Google Chrome

The article is well informed, and I would suggest the same in principle...

Except that in my recent informal performance comparison between JavaScript, C# and C++
the difference is still significant enough to justify native application:

* JavaScript - about 50 msec (Firefox and Chrome); IE9: about 190 msec
* C# - about 20 msec
* C++ - about 5 msec

This was a pure combinatorial calculation, no UI, no big data...

By the way, iPhone programming is Objective-C, as native-optimized as it can be...
Not easy on developers, but easy on mobile device...
Windows Phone 7 programming is in .NET (C#)
WebOS programming is in JavaScript

Here is part of one comment on original MIT article:

Apple has sold 187 million iOS devices (over 100 million iPhones, approximately 70 million iPod touches and around 20 million iPads),
By contrast, Google announced at I/O that only 100 million Android devices have shipped so far.
- Developer income (2010): $1.782 billion from iOS App Store vs $102 million from Android Marketplace
- 71% of all app downloads were to iOS devices in 2010 according to ABI Research
- Apple captured 82% of the revenue from all app stores in 2010 compared to 5% for Android

Tuesday, May 17, 2011

performance - C# Dynamic Keyword — Run-time penalty?

I have done some ad-hock performance comparison testing
between JavaScript and C# (more about this some other time),
and between C# value type (int), object and dynamic, and results are "interesting".
"object" is 2.5 x slower than "int", and "dynamic" is 10x slower than "object".
Same exact combinatorial code... Beware of "dynamic" tax!

Here is an explanation from StackOverflow, by
Eric Lippert, a principal developer on the Microsoft Visual C# compiler team.

performance - C# Dynamic Keyword — Run-time penalty? - Stack Overflow

However, let's consider the performance implications of some operations at an abstract level. Suppose you have:

int x = 123;
int y = 456;
int z = x + y;

Adding two integers takes about a billionth of a second on most hardware these days.

What happens if we make it dynamic?

dynamic x = 123;
dynamic y = 456;
dynamic z = x + y;

Now what does this do at runtime? This boxes 123 and 456 into objects, which allocates memory on the heap and does some copies.

Then it starts up the DLR and asks the DLR 'has this code site been compiled once already with the types for x and y being int and int?'

The answer in this case is no. The DLR then starts up a special version of the C# compiler which analyzes the addition expression, performs overload resolution, and spits out an expression tree describing the lambda which adds together two ints. The DLR then compiles that lambda into dynamically generated IL, which the jit compiler then jits. The DLR then caches that compiled state so that the second time you ask, the compiler doesn't have to do all that work over again.

That takes longer than a nanosecond. It takes potentially many thousands of nanoseconds.

Sunday, May 08, 2011

Base32 Encoding

Base32 Encoding, by Douglas Crockford, also creator of JSON, a well known JavaScript expert

This is a human-friendly ASCII-text based encoding.
Very convenient for making IDs and keys,
since base32 is 3.2 times more efficient than simple base 10 numbers,
and 2x more efficient than base16, used for typical GUIDs.

That is like option to get a vehicle
that makes 32 miles per gallon (mpg) instead of 10 mpg,
or 64 instead of typical 20 mpg, or 150 mpg if you already drive Prius.

And at the same time BASE32 eliminates problems
with similar letters and numbers that are hard to distinguish.

1, I, i, L, l ==> 1
0, O, o ==> 0
V, v, U, u ==> 27

Value = Encode Symbol
0 = 0
1 = 1
2 = 2
3 = 3
4 = 4
5 = 5
6 = 6
7 = 7
8 = 8
9 = 9
10 = A
11 = B
12 = C
13 = D
14 = E
15 = F
16 = G
17 = H
18 = J
19 = K
20 = M
21 = N
22 = P
23 = Q
24 = R
25 = S
26 = T
27 = V
28 = W
29 = X
30 = Y
31 = Z

Decode Symbol = Value
0 = 0
1 = 1
2 = 2
3 = 3
4 = 4
5 = 5
6 = 6
7 = 7
8 = 8
9 = 9
A a = 10
B b = 11
C c = 12
D d = 13
E e = 14
F f = 15
G g = 16
H h = 17
I i = 1 (*)
J j = 18
K k = 19
L l = 1 (*)
M m = 20
N n = 21
P p = 22
Q q = 23
R r = 24
S s = 25
T t = 26
V v = 27
U u = 27 (*)
W w = 28
X x = 29
Y y = 30
Z z = 31

Monday, May 02, 2011

Salman Khan: Let's use video to reinvent education

Salman Khan: Let's use video to reinvent education | Video on
(TED video also featuring Bill Gates asking questions)

There are some special people, that make special things happen.
This one is clearly one of them...

I listened many TED talks, didn't ever hear applause like one he received!

As usual for special people, Salman has re-invented education, all naturally.
MIT and Harvard degrees must have helped,
and experience as hedge fund manager... maybe...

Out of YouTube phenomenon Khan-Academy is evolving in real education resource,
turning upside down most of typical thinking about roles of teachers and homework,
and making learning fun.
I wish such method is used in all schools, and I think I am not alone in this wish...

... If Isaac Newton had done YouTube videos on calculus, I wouldn't have to. (Laughter) Assuming he was good. We don't know. (Laughter)...

...what I do is I assign the lectures for homework. And what used to be homework, I now have the students doing in the classroom.... removing the one size fits all lecture from the classroom and letting students have a self-paced lecture at home, and then when you go to the classroom, letting them do work, having the teacher walk around, having the peers actually be able to interact with each other, these teachers have used technology to humanize the classroom...

...the paradigm here is, we'll generate as many questions as you need until you get that concept, until you get 10 in a row...

...our model is learn math the way you'd learn anything, like the way you would learn a bicycle. Stay on that bicycle. Fall off that bicycle. Do it as long as necessary until you have mastery. The traditional model, it penalizes you for experimentation and failure, but it does not expect mastery. We encourage you to experiment. We encourage you to failure. But we do expect mastery...