Search This Blog

Showing posts with label General. Show all posts
Showing posts with label General. Show all posts

Monday, January 10, 2011

9 rules of innovation from Google

1. Innovation, not instant perfection
"There are two different types of programmers. Some like to code for months or even years, and hope they will have built the perfect product. That's castle building. Companies work this way, too. Apple is great at it. If you get it right and you've built just the perfect thing, you get this worldwide 'Wow!' The problem is, if you get it wrong, you get a thud, a thud in which you've spent, like, five years and 100 people on something the market doesn't want."
"Others prefer to have something working at the end of the day, something to refine and improve the next day. That's what we do: our 'launch early and often' strategy. The hardest part about indoctrinating people into our culture is when engineers show me a prototype and I'm like, 'Great, let's go!' They'll say, 'Oh, no, it's not ready.
It's not up to Google standards. This doesn't look like a Google product yet.' They want to castle-build and do all these other features and make it all perfect."
"I tell them, 'The Googly thing is to launch it early on Google Labs and then iterate, learning what the market wants--and making it great.' The beauty of experimenting in this way is that you never get too far from what the market wants. The market pulls you back."

2. Ideas come from everywhere
"We have this great internal list where people post new ideas and everyone can go on and see them. It's like a voting pool where you can say how good or bad you think an idea is. Those comments lead to new ideas."

3. A license to pursue your dreams
"Since around 2000, we let engineers spend 20% of their time working on whatever they want, and we trust that they'll build interesting things. After September 11, one of our researchers, Krishna Bharat, would go to 10 or 15 news sites each day looking for information about the case. And he thought, Why don't I write a program to do this? So Krishna , who's an expert in artificial intelligence, used a Web crawler to cluster articles."
"He later emailed it around the company. My office mate and I got it, and we were like, 'This isn't just a cool little tool for Krishna . We could add more sources and build this into a great product.' That's how Google News came about. Krishna did not intend to build a product, but he accidentally gave us the idea for one."
"We let engineers spend 20% of their time working on whatever they want, and we trust that they'll build interesting things."

4. Morph projects don't kill them
"Eric [Schmidt, CEO] made this observation to me once, which I think is accurate: Any project that is good enough to make it to Labs probably has a kernel of something interesting in there so

5. Share as much information as you can
"People are blown away by the information you can get on MOMA, our intranet. Because there is so much information shared across the company, employees have insight into what's happening with the business and what's important."
"We also have people do things like Snippets. Every Monday, all the employees write an email that has five to seven bullet points on what you did the previous week. Being a search company, we take all the emails and make a giant Web page and index them."
"If you're wondering, 'Who's working on maps?' you can find out.. It allows us to share what we know across the whole company, and it reduces duplication."
Mew here, even if the market doesn't respond to it. It's our job to take the product and morph it into something that the market needs."

6. Users, users, users
"I used to call this 'Users, Not Money.' We believe that if we focus on the users, the money will come. In a truly virtual business, if you're successful, you'll be working at something that's so necessary people will pay for it in subscription form. Or you'll have so many users that advertisers will pay to sponsor the site."

7. Data is apolitical
"When I meet people who run design at other organizations, they're always like, 'Design is one of the most political areas of the company. This designer likes green and that one likes purple, and whose design gets picked? The one who buddies up to the boss.'
Some companies think of design as an art. We think of design as a science. It doesn't matter who is the favorite or how much you like this aesthetic versus that aesthetic. It all comes down to data. Run a 1% test [on 1% of the audience] and whichever design does best against the user-happiness metrics over a two-week period is the one we launch. We have a very academic environment where we're looking at data all the time.
We probably have somewhere between 50 and 100 experiments running on live traffic, everything from the default number of results to underlined links to how big an arrow should be. We're trying all those different things."

8. Creativity loves constraints
"This is one of my favorites. People think of creativity as this sort of unbridled thing, but engineers thrive on constraints. They love to think their way out of that little box: 'We know you said it was impossible, but we're going to do this, this, and that to get us there.'"

9. You're brilliant? We're hiring
"When I was a grad student at Stanford, I saw that phrase on a flyer for another company in the basement of the computer-science building. It made me stop dead in my tracks and laugh out loud."
"A couple of months later, I'm working at Google, and the engineers were asked to write job ads for engineers. We had a contest. I put, 'You're brilliant? We're hiring. Come work at Google,' and got eight times the click rate that anyone else got.
"Google now has a thousand times as many people as when I started, which is just staggering to me. What's remarkable, though, is what hasn't changed--the types of people who work here and the types of things that they like to work on. It's almost identical to the first 20 or so of us at Google."
"There is this amazing element to the culture of wanting to work on big problems that matter, wanting to do great things for the world, believing that we can build a successful business without compromising our standards and values.."
"If I'm an entrepreneur and I want to start a Web site, I need a billing system. Oh, there's Google Checkout. I need a mapping function. Oh, there's Google Maps. Okay, I need to monetize. There's Google AdSense, right? I need a user name and password-authentication system. There's Google Accounts."
"This is just way easier than going out and trying to create all of that from scratch. That's how we're going to stay innovative. We're going to continue to attract entrepreneurs who say, 'I found an idea, and I can go to Google and have a demo in a month and be launched in six.'"

Thursday, December 2, 2010

PHP 6 Features

PHP is already popular, used in millions of domains (according to Netcraft), supported by most ISPs and used by household-name Web companies like Yahoo! The upcoming versions of PHP aim to add to this success by introducing new features that make PHP more usable in some cases and more secure in others. Are you ready for PHP V6? If you were upgrading tomorrow, would your scripts execute just fine or would you have work to do? This article focuses on the changes for PHP V6 — some of them back-ported to versions PHP V5.x — that could require some tweaks to your current scripts.
If you're not using PHP yet and have been thinking about it, take a look at its latest features. These features, from Unicode to core support for XML, make it even easier for you to write feature-filled PHP applications.
PHP V6 is currently available as a developer snapshot, so you can download and try out many of the features and changes listed in this article. For features that have been implemented in the current snapshot, see Resources.
Much improved for PHP V6 is support for Unicode strings in many of the core functions. This new feature has a big impact because it will allow PHP to support a broader set of characters for international support. So, if you're a developer or architect using a different language, such as the Java™ programming language, because it has better internationalization (i18n) support than PHP, it'll be time to take another look at PHP when the support improves.
Because you can download and use a developer's version of PHP V6 today, you will see some functions already supporting Unicode strings. For a list of functions that have been tested and verified to handle Unicode, seeResources.
What is Unicode?
Unicode is an industry-standard set of characters, character encoding, and encoding methodologies primarily aimed at enabling i18n and localization (i10n). The Unicode Transformation Format (UTF) specifies a way to encode characters for Unicode. For more information about Unicode and UTF, see Resources.
Namespaces are a way of avoiding name collisions between functions and classes without using prefixes in naming conventions that make the names of your methods and classes unreadable. So by using namespaces, you can have class names that someone else might use, but now you don't have to worry about running into any problems. Listing 1 provides an example of a namespace in PHP.
You won't have to update or change anything in your code because any PHP code you write that doesn't include namespaces will run just fine. Because the namespaces feature appears to be back-ported to V5.3 of PHP, when it becomes available, you can start to introduce namespaces into your own PHP applications.

Listing 1. Example of a namespace
<?php
// I'm not sure why I would implement my own XMLWriter, but at least
// the name of this one won't collide with the one built in to PHP
namespace NathanAGood;
class XMLWriter 
{
    // Implementation here...




}

$writer = new NathanAGood::XMLWriter();

?>

Depending on how you use PHP and what your scripts look like now, the language and syntax differences in PHP V6 may or may not affect you as much as the next features, which are those that directly allow you to introduce Web 2.0 features into your PHP application.
SOAP is one of the protocols that Web services "speak" and is supported in quite a few other languages, such as the Java programming language and Microsoft® .NET. Although there are other ways to consume and expose Web services, such as Representational State Transfer (REST), SOAP remains a common way of allowing different platforms to have interoperability. In addition to SOAP modules in the PHP Extension and Application Repository (PEAR) library, a SOAP extension to PHP was introduced in V5. This extension wasn't enabled by default, so you have to enable the extension or hope your ISP did. In addition, PEAR packages are available that allow you to build SOAP clients and servers, such as the SOAP package.
Unless you change the default, the SOAP extension will be enabled for you in V6. These extensions provide an easy way to implement SOAP clients and SOAP servers, allowing you to build PHP applications that consume and provide Web services.
If SOAP extensions are on by default, that means you won't have to configure them in PHP. If you develop PHP applications and publish them to an ISP, you may need to check with your ISP to verify that SOAP extensions will be enabled for you when they upgrade.
As of PHP V5.1, XMLReader and XMLWriter have been part of the core of PHP, which makes it easier for you to work with XML in your PHP applications. Like the SOAP extensions, this can be good news if you use SOAP or XML because PHP V6 will be a better fit for you than V4 out of the box.
The XMLWriter and XMLReader are stream-based object-oriented classes that allow you to read and write XML without having to worry about the XML details.

Back to top


In addition to having new features, PHP V6 will not have some other functions and features that have been in previous versions. Most of these things, such as register_globals and safe_mode, are widely considered "broken" in current PHP, as they may expose security risks. In an effort to clean up PHP, the functions and features listed in the next section will be removed, or deprecated, from PHP. Opponents of this removal will most likely cite issues with existing scripts breaking after ISPs or enterprises upgrade to PHP V6, but proponents of this cleanup effort will be happy that the PHP team is sewing up some holes and providing a cleaner, safer implementation.
Features that will be removed from the PHP version include:
  • magic_quotes
  • register_globals
  • register_long_arrays
  • safe_mode
Citing portability, performance, and inconvenience, the PHP documentation discourages the use of magic_quotes. It's so discouraged that it's being removed from PHP V6 altogether, so before upgrading to PHP V6, make sure that all your code avoids using magic_quotes. If you're using magic_quotes to escape strings for database calls, use your database implementation's parameterized queries, if they're supported. If not, use your database implementation's escape function, such as mysql_escape_string for MySQL or pg_escape_string for PostgreSQL. Listing 2 shows an example of magic_quotes use.

Listing 2. Using magic_quotes (discouraged)
<?php
// Assuming magic_quotes is on...
$sql = "INSERT INTO USERS (USERNAME) VALUES $_GET['username']";
?>

After preparing your PHP code for the new versions of PHP, your code should look like that in Listing 3.

Listing 3. Using parameterized queries (recommended)
<?php


// Using the proper parameterized query method for MySQL, as an example
$statement = $dbh->prepare("INSERT INTO USERS (USERNAME) VALUES ?");
$statement->execute(array($_GET['username']));




?>

Now that support for magic_quotes will be completely removed, the get_magic_quotes_gpc() function will no longer be available. This may affect some of the older PHP scripts, so before updating, make sure you fix any locations in which this functions exists.
The register_globals configuration key was already defaulted to off in PHP V4.2, which was controversial at the time. When register_globals is turned on, it was easy to use variables that could be injected with values from HTML forms. These variables don't really require initialization in your scripts, so it's easy to write scripts with gaping security holes. The register_globals documentation (see Resources) provides much more information aboutregister_globals. See Listing 4 for an example of using register_globals.

Listing 4. Using register_globals (discouraged)
<?php
// A security hole, because if register_globals is on, the value for user_authorized
// can be set by a user sending them on the query string 
// (i.e., http://www.example.com/myscript.php?user_authorized=true)




if ($user_authorized) {
    // Show them everyone's sensitive data...
}
?>

If your PHP code uses global variables, you should update it. If you don't update your code to get prepared for newer versions of PHP, consider updating it for security reasons. When you're finished, your code should look like Listing 5.

Listing 5. Being specific instead (recommended)
<?php
function is_authorized() {
    if (isset($_SESSION['user'])) {
        return true;
    } else {
        return false;
    }
}

$user_authorized = is_authorized();
?>




The register_long_arrays setting, when turned on, registers the $HTTP_*_VARS predefined variables. If you're using the longer variables, update now to use the shorter variables. This setting was introduced in PHP V5 — presumably for backward-compatibility — and the PHP folks recommend turning it off for performance reasons. Listing 6 shows an example of register_long-arrays use.

Listing 6. Using deprecated registered arrays (discouraged) 
<?php
    // Echo's the name of the user value given on the query string, like
    // http://www.example.com/myscript.php?username=ngood




    echo "Welcome, $HTTP_GET_VARS['username']!";
?>

If your PHP code looks like that shown in Listing 6, update it to look like that in Listing 7. Shut off theregister_long_arrays setting if it's on and test your scripts again.

Listing 7. Using $_GET (recommended)
<?php


    // Using the supported $_GET array instead.
    echo "Welcome, $_GET['username']!";
?>

The safe_mode configuration key, when turned on, ensures that the owner of a file being operated on matches the owner of the script that is executing. It was originally a way to attempt to handle security when operating in a shared server environment, like many ISPs would have. (For a link to a list of the functions affected by thissafe_mode change, see Resources.) Your PHP code will be unaffected by this change, but it's good to be aware of it in case you're setting up PHP in the future or counting on safe_mode in your scripts.
Microsoft Active Server Pages (ASP)-style tags — the shorter version of the PHP tags — are no longer supported. To make sure this is not an issue for your scripts, verify that you aren't using the <% or %> tags in your PHP files. Replace them with <?php and ?>.
The PHP team is removing support for both FreeType 1 and GD 1, citing the age and lack of ongoing developments of both libraries as the reason. Newer versions of both of these libraries are available that provide better functionality. For more information about FreeType and GD, see Resources.
The ereg extension, which supports Portable Operating System Interface (POSIX) regular expressions, is being removed from core PHP support. If you are using any of the POSIX regex functions, this change will affect you unless you include the ereg functionality. If you're using POSIX regex today, consider taking the time to update your regex functions to use the Perl-Compatible Regular Expression (PCRE) functions because they give you more features and perform better. Table 1 provides a list of the POSIX regex functions that will not be available after eregis removed. Their PCRE replacements are also shown.

Table 1. ereg() functions and their PCRE equivalents
ereg() functionSimilar preg() function
ereg()eregi()preg_match()
ereg_replace()ereg_replacei()preg_replace()

Wednesday, July 21, 2010

OutLook Attachment reminder


Most of the time I use to forget to attach the files after mentioning file has been attached to this email so to avoid this I wrote a small piece of code(VBA) which can check for attachment as well as for subject line is empty


Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim strSubject, strBody As String
strSubject = Item.Subject
strBody = Item.Body

If (InStr(LCase(strBody), "attach") > 0 And (Item.Attachments.Count) = 0) Then
Prompt$ = "You have not attached document,But specified in the Mail, Still you want to send ?"
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check for Subject") = vbNo Then
Cancel = True
Exit Sub
End If
End If
If Len(Trim(strSubject)) = 0 Then
Prompt$ = "Subject is Empty. Are you sure you want to send the Mail?"
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check for Subject") = vbNo Then
Cancel = True
End If
End If
End Sub


Press Alt+F11 from your outlook window and paste the code on the code window
Press debug -> compile
Save and close
  • Go to C:\Program Files\Microsoft Office\Office10 or C:\Program Files\Microsoft Office\Office folder in your computer 
  • Open "SELFCERT.EXE" Enter name "sundar" and click ok
  • Restart your Outlook
  • Then press Alt+F11 again from the tools menu select digital signature select the file "sundar"
  • Click Ok and restart Outlook
That It .

Saturday, May 29, 2010

Multiples of bytes


Multiples of bytes
SI decimal prefixes
IEC
 binary prefixes
Name
(Symbol)
Standard
SI
Binary
usage

Name
(Symbol)
Value
kilobyte
 (kB)
103210kibibyte
 (KiB)
210
megabyte
 (MB)
106220mebibyte
 (MiB)
220
gigabyte
 (GB)
109230gibibyte
 (GiB)
230
terabyte
 (TB)
1012240tebibyte
 (TiB)
240
petabyte
 (PB)
1015250pebibyte
 (PiB)
250
exabyte
 (EB)
1018260exbibyte (EiB)260
zettabyte
 (ZB)
1021270zebibyte
 (ZiB)
270
yottabyte
 (YB)
1024280yobibyte
 (YiB)