Scott Adams Blog: The Illusion of Winning 08/30/2010

Let’s say that you and I decide to play pool. We agree to play eight-ball, best of five games. Our perception is that what follows is a contest to see who will do something called winning.

But I don’t see it that way. I always imagine the outcome of eight-ball to be predetermined, to about 95% certainty, based on who has practiced that specific skill the most over his lifetime. The remaining 5% is mostly luck, and playing a best of five series eliminates most of the luck too.

I found this really insightful. It seems obvious when you read it but for some reason it doesn’t seem to occur naturally to me.

Posted via email from Sijin Joseph

Share and Enjoy:
  • Digg
  • del.icio.us
  • DotNetKicks
  • Furl
  • IndiaGram
  • IndianPad
  • Netscape
  • Reddit
  • Slashdot
  • Technorati
  • NewsVine
  • SphereIt
  • StumbleUpon

High Scalability – High Scalability – Pomegranate – Storing Billions and Billions of Tiny Little Files

Pomegranate is a novel distributed file system built over distributed tabular storage that acts an awful lot like a NoSQL system. It’s targeted at increasing the performance of tiny object access in order to support applications like online photo and micro-blog services, which require high concurrency, high throughput, and low latency. Their tests seem to indicate it works:

We have demonstrate that file system over tabular storage performs well for highly concurrent access. In our test cluster, we observed linearly increased more than 100,000 aggregate read and write requests served per second (RPS). 

Rather than sitting atop the file system like almost every other K-V store, Pomegranate is baked into file system. The idea is that the file system API is common to every platform so it wouldn’t require a separate API to use. Every application could use it out of the box.

The features of Pomegranate are:

  • It handles billions of small files efficiently, even in one directory;
  • It provide separate and scalable caching layer, which can be snapshot-able;
  • The storage layer uses log structured store to absorb small file writes to utilize the disk bandwidth;
  • Build a global namespace for both small files and large files;
  • Columnar storage to exploit temporal and spatial locality;
  • Distributed extendible hash to index metadata;
  • Snapshot-able and reconfigurable caching to increase parallelism and tolerant failures;
  • Pomegranate should be the first file system that is built over tabular storage, and the building experience should be worthy for file system community. 

Very cool technology. This reminded me of a distributed filesystem Google Tech Talk (http://www.youtube.com/watch?v=3xKZ4KGkQY8) on Wuala (http://www.wuala.com/) that I found fascinating for all the little problems they had to overcome to make this work.

Posted via email from Sijin Joseph

Share and Enjoy:
  • Digg
  • del.icio.us
  • DotNetKicks
  • Furl
  • IndiaGram
  • IndianPad
  • Netscape
  • Reddit
  • Slashdot
  • Technorati
  • NewsVine
  • SphereIt
  • StumbleUpon

Beginner’s Guide to Linkers

Well written article on the role of Linkers, covers *nix and Windows systems.

Posted via email from Sijin Joseph

Share and Enjoy:
  • Digg
  • del.icio.us
  • DotNetKicks
  • Furl
  • IndiaGram
  • IndianPad
  • Netscape
  • Reddit
  • Slashdot
  • Technorati
  • NewsVine
  • SphereIt
  • StumbleUpon

SSMS Addins – Object Finder – DataScripter

While searching yet again for the SQL to find a particular piece of text inside SQL server proc definitions I came across this cool Addin project that does exactly that and also has other cool features like generating the data insert scripts for a table.

Posted via email from Sijin Joseph

Share and Enjoy:
  • Digg
  • del.icio.us
  • DotNetKicks
  • Furl
  • IndiaGram
  • IndianPad
  • Netscape
  • Reddit
  • Slashdot
  • Technorati
  • NewsVine
  • SphereIt
  • StumbleUpon

Regular Expression to check for primes

perl -wle ‘print “Prime” if (1 x shift) !~ /^1?$|^(11+?)\1+$/’ [number]

This is a nice trick to check if a number is prime using regular expressions, I am going to try and see how this performs compared to regular methods and see if anything interesting comes up.

Posted via email from Sijin Joseph

Share and Enjoy:
  • Digg
  • del.icio.us
  • DotNetKicks
  • Furl
  • IndiaGram
  • IndianPad
  • Netscape
  • Reddit
  • Slashdot
  • Technorati
  • NewsVine
  • SphereIt
  • StumbleUpon

Summary of use cases for non-relational storage

To understand why NoSQL is important to you as an app developer, let’s consider the use cases for some of these features:

  • Frequently-written, rarely read statistical data (for example, a web hit counter) should use an in-memory key/value store like Redis, or an update-in-place document store like MongoDB.
  • Big Data (like weather stats or business analytics) will work best in a freeform, distributed db system like Hadoop.
  • Binary assets (such as MP3s and PDFs) find a good home in a datastore that can serve directly to the user’s browser, like Amazon S3.
  • Transient data (like web sessions, locks, or short-term stats) should be kept in a transient datastore like Memcache. (Traditionally we haven’t grouped memcached into the database family, but NoSQL has broadened our thinking on this subject.)
  • If you need to be able to replicate your data set to multiple locations (such as syncing a music database between a web app and a mobile device), you’ll want the replication features of CouchDB.
  • High availability apps, where minimizing downtime is critical, will find great utility in the automatically clustered, redundant setup of datastores like Casandra and Riak.

Despite all the use cases described above, there will always be a place for the highly normalized, transactional, ad-hoc-query capabilities of SQL databases. We’re adding new tools to our toolbox, not removing old ones.

Nice summary on the Heroku blog about use cases for non-relational storage services.

Posted via email from Sijin Joseph

Share and Enjoy:
  • Digg
  • del.icio.us
  • DotNetKicks
  • Furl
  • IndiaGram
  • IndianPad
  • Netscape
  • Reddit
  • Slashdot
  • Technorati
  • NewsVine
  • SphereIt
  • StumbleUpon

Meditation: Why Bother?

And just because of the simple fact that you are human, you find yourself heir to an inherent unsatisfactoriness in life which simply will not go away. You can suppress it from your awareness for a time. You can distract yourself for hours on end, but it always comes back–usually when you least expect it. All of a sudden, seemingly out of the blue, you sit up, take stock, and realize your actual situation in life.

There you are, and you suddenly realize that you are spending your whole life just barely getting by. You keep up a good front. You manage to make ends meet somehow and look OK from the outside. But those periods of desperation, those times when you feel everything caving in on you, you keep those to yourself. You are a mess. And you know it. But you hide it beautifully. Meanwhile, way down under all that you just know there has got be some other way to live, some better way to look at the world, some way to touch life more fully. You click into it by chance now and then. You get a good job. You fall in love. You win the game. and for a while, things are different. Life takes on a richness and clarity that makes all the bad times and humdrum fade away. The whole texture of your experience changes and you say to yourself, “OK, now I’ve made it; now I will be happy”. But then that fades, too, like smoke in the wind. You are left with just a memory. That and a vague awareness that something is wrong.

But there is really another whole realm of depth and sensitivity available in life, somehow, you are just not seeing it. You wind up feeling cut off. You feel insulated from the sweetness of experience by some sort of sensory cotton. You are not really touching life. You are not making it again. And then even that vague awareness fades away, and you are back to the same old reality. The world looks like the usual foul place, which is boring at best. It is an emotional roller coaster, and you spend a lot of your time down at the bottom of the ramp, yearning for the heights.

So what is wrong with you? Are you a freak? No. You are just human. And you suffer from the same malady that infects every human being. It is a monster inside all of us, and it has many arms: Chronic tension, lack of genuine compassion for others, including the people closest to you, feelings being blocked up, and emotional deadness. Many, many arms. None of us is entirely free from it. We may deny it. We try to suppress it. We build a whole culture around hiding from it, pretending it is not there, and distracting ourselves from it with goals and projects and status. But it never goes away. It is a constant undercurrent in every thought and every perception; a little wordless voice at the back of the head saying, “Not good enough yet. Got to have more. Got to make it better. Got to be better.” It is a monster, a monster that manifests everywhere in subtle forms.

Very nice article on Buddhist philosophy and the power of meditation.

Posted via email from Sijin Joseph

Share and Enjoy:
  • Digg
  • del.icio.us
  • DotNetKicks
  • Furl
  • IndiaGram
  • IndianPad
  • Netscape
  • Reddit
  • Slashdot
  • Technorati
  • NewsVine
  • SphereIt
  • StumbleUpon

China is not the world’s biggest manufacturer

Wow, Talk about false perceptions. This was one of the things that I had taken for granted for so long that it was very surprising for me to ready today that China is not the world's largest manufacturer. I read this at Helen Wang's site http://helenhwang.net/2010/03/myth-of-manufacturing/ 

I quote

"The latest data shows, however, that the United States is still the largest manufacturer in the world. In 2008, U.S. manufacturing output was $1.8 trillion, compared to $1.4 trillion in China (UN data. China’s data do not separate manufacturing from mining and utilities. So the actual Chinese manufacturing number should be much smaller)."

Make sure to read the complete article, it has more interesting facts about how the manufacturing growth in China has not resulted in a rise in the middle class.

Posted via email from Sijin Joseph

Share and Enjoy:
  • Digg
  • del.icio.us
  • DotNetKicks
  • Furl
  • IndiaGram
  • IndianPad
  • Netscape
  • Reddit
  • Slashdot
  • Technorati
  • NewsVine
  • SphereIt
  • StumbleUpon

soapUI – Web Service tool

Sometimes a you come across a tool that just makes you think why you never used it before, I ran across one such tool last month, it’s called soapUI (http://www.soapui.org/ ).

This is an open source tool for testing web services, everything I wanted to do for testing some of the web services that we were developing including unit testing and load testing was provided out of the box by this awesome tool. Also I think the UI is quite well thought out and mature.

Here’s a list of the features at a high level,

soapUI is a free and open source desktop application for

It is mainly aimed at developers and testers providing or consuming WSDL or REST based Web Services (Java, .net, etc). Functional and Load Testing can be done both interactively in soapUI or within an automated build or integration process using the soapUI command line tools.

Mock Web Services can easily be created for any WSDL and hosted from within soapUI or using the command-line MockService runner. IDE-plugins are available for

soapUI requires Java 1.5 and is licensed under the LGPL license.

See their features page http://www.soapui.org/features.html for some screenshots of the cool stuff you can do using this.

Posted via email from Sijin Joseph

Share and Enjoy:
  • Digg
  • del.icio.us
  • DotNetKicks
  • Furl
  • IndiaGram
  • IndianPad
  • Netscape
  • Reddit
  • Slashdot
  • Technorati
  • NewsVine
  • SphereIt
  • StumbleUpon

OutOfMemory/Heap space errors in Java

Recently I had to work on a Java based rule modeling tool that was built on Java/Eclipse. The tool was pushing both eclipse and the JVM to the limits in terms of memory and I was getting a lot of OutOfMemory exceptions and out of heap space errors, usually these can be fixed by increasing the default limits.

The important settings in question are arguments passed to the JVM on startup, http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html

-Xmsn

Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is chosen at runtime based on system configuration. For more information, see HotSpot Ergonomics 
Examples:

       -Xms6291456
       -Xms6144k
       -Xms6m
       

-Xmxn

Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is chosen at runtime based on system configuration. For more information, see HotSpot Ergonomics 
Examples:

       -Xmx83886080
       -Xmx81920k
       -Xmx80m

Other advanced VM settings are documented here, http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp

1.       Eclipse IDE – If the IDE itself is running out of memory when compiling or editing code then you can increase the maximum memory pool using the Xmx option in eclipse.ini file present in the same folder as eclipse.exe.

2.       JVM from within eclipse – If the JVM is running out of memory when running an app from within eclipse, then you can adjust the memory settings from the JVM configuration tab within eclipse.

3.       JVM from Tomcat – On the Apache Tomcat configuration utility on the Java tab, you can specify the memory and heap settings.

Posted via email from Sijin Joseph

Share and Enjoy:
  • Digg
  • del.icio.us
  • DotNetKicks
  • Furl
  • IndiaGram
  • IndianPad
  • Netscape
  • Reddit
  • Slashdot
  • Technorati
  • NewsVine
  • SphereIt
  • StumbleUpon