Friday, February 18, 2011

Why big internet companies (Google, Facebook, Twitter, Yahoo, etc) going so much open source ?


If you were ever wondering why these big comapanies (Google, Facebook, Twitter, Yahoo, etc) going so much open source. There are various factors that contributed to this attitude of these new corporates. These factors are Cost of training, Delivery Time & Quality of delivery and ultimately assurance about replicating infrastructure at thier level needs lots of capital. Now each fators in detail, 
Cost of Training - Any big comapany goes into phases of attrition then new hires as norm not exception. So, they want new people to at least familiar with technologies they are working with, if not the whole process.  

Delivery Time & Quality of delivery - For these big internet brand names delivery time and Quality of any service or feature and addressing any critical issue in short span of time are crucial for their brand name. They are earning because of their brand name otherwise their are many pirates are out there. So, they need developeswho can write quality code in short time. And, these two things increase over time of developer association with technology used. Therefore, this is most important factor why these companies want developers to know about what they are working upon.

Assurace - BIG Internet companies are more about scale and process rather than trade secrets and softwares. they know their most of the client side code can be easily be duplicated. So, they concentrate on not on how to protect that but concentrate on scaling each product to a level where others can't do that much of scaling. Even, scaling to that level is also possible but that is certainely very capital intensive. So, they are almost assure that their scaling cannot be challenged in near future.

Wednesday, September 22, 2010

Python : Create path or directories, if not exist

I came across to this question very often, that how to create a directory structure, if I know the exact path of file or directory hierarchy. That is not difficult but very time consuming if you don't know where to find the resources. Let go to code we need,

def assure_path_exists(path):
        dir = os.path.dirname(path)
        if not os.path.exists(dir):
                os.makedirs(dir)
first line define python function/module assure_path_exists, which take one argument "path" of file or directory.
second line, ensure path contain directory only. it strips filename, if there is any.
third line, checks for whether this path (pointed by dir), exists or not
forth line, if path pointed by dir not exists, we create that path through os.makedirs

Done!!!

Saturday, September 11, 2010

Within instant Google forgot basics of its embraced AJAX

I love Google, that is most of the developers says. Their day starts with Googling. Google defined standards of search engine industry. They embraced AJAX technology with Gmail, Google Docs etc.  They define standards of how to use AJAX effectively and efficiently. But, unfortunately today I found a usage of improper usage of AJAX in their webpage and that webpage is nothing but their Home page. Firstly, I didn't believe my eyes, I redo it 4-5 times with different browsers then I believed it. They missed handling back button. They didn't clear the result if back button reaches to their home page.

Here are the steps to reproduce it ( if after this post, they still didn't correct it).

1. Go to Google.com, and type whatever query you have and press enter. In my case, I typed "Blender" as I am learning 3D now a days



2. You reach result page, everything remain normal

3. Press back button of your browser. OOPS!!! I reached google home page with background contains previous result.

After this, I thought might be this is problem with Chromium alone as it is nightly build of Chromium. So, I tried it in Firefox also. Thats test is also turn positive thats why I writing this ;)

1.


2.


3.


Note: It is big because it is Google's Home page. Otherwise, who cares.
I feel sorry for Google guys as they have to come and fix this and its weekend already. sorry guys.

Thursday, January 14, 2010

The speech by Steve Jobs at Standford's in 2005 : Highly Motivational

This speech is highly motivational to me, when I first watched it in 2007. May be this could help you also. May be you need some information about Steve Jobs to understand this video.
Some takes for me from the speech,
  • Never stop on hurdles, it leads us to match dots when we look back to our life.
  • Love your work, and
  • Send positive energy to others and it also returned back to you.



Wednesday, January 13, 2010

Planned Security attack on Google and other companies, May lead to cease Google's China operation

Yesterday, Google on its blog mentioned that it faced security attack in mid-December. And, some other organizations from different fields were targeted. Google tracked these attackers from China seeking gmail account information of some Human Right Activists of China. As blog mentioned These attacks were not as successful as it is intended to be. Google thinks that further restrict free speech on web for Chinese people. So, Now they will talk to Chinese officials to see how Google.cn can provide uncensored content to the people of China without violating Chinese laws. If there is no way out then Google may cease its Chinese operation Google.cn .

Some comments on Techcrunch says that Google is very far behind some Chinese search site Baidu.com. on Alexa's Top sites, Baidu.com comes 8th and Google.cn comes 15th in the list. Baidu.com comes above Twitter and Myspace and many more. So, that lead to one another conclusion that Google may be tricking readers to get some extra market in China.

Whatever, may be the cause now Google cannot take a back from what they had done. If they
not backed what they write then it will definitely tarnish its image of good boy. But, if they not backed out and stop china operations that will hurt because China is very large market to any of the company and specially for Google.

Only, time will tell what is the behind the scene story.

Tuesday, April 21, 2009

Scroll back to page start after Asyncronous postback(multiple update panels)

I have multiple update panels in User controls and it cause page to go to start after each asynchronous postback. By adding this code, I am able to handle the Problem I am facing.

the code in script tag is:
var xpos, ypos;

function windowScroll() {
xpos = document.body.parentNode.scrollLeft; //window.scrollX is not compatible with IE 6
ypos = document.body.parentNode.scrollTop; //window.scrollY is not compatible with IE 6
}
function pageLoaded(sender, args) {
window.scrollTo(xpos, ypos);
}

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(pageLoaded);
window.onscroll = windowScroll;


Adding this code in body section in the end because 'Sys' must have to defined before using this code.

Thursday, April 9, 2009

Google Experimenting too much with GMail without prior knowledge to Users

Google, Now experimenting with Gmail to improve its user experience. But they are giving buggy services to its user. I know Gmail is free but how You can justify this bugs. I have experiencing problem with my Gmail's in browser chat. At one time is not loading properly take a look



That is the Second time from morning I am facing this problem.