Wednesday 25 February 2009
Facebook StumbleUpon Twitter Google+ Pin It

Announcing the Native Client Security Contest



Exploits, bugs, vulnerabilities, security holes -- for most programmers these terms are synonymous with fire drills and coding all-nighters. However, for the next 10 weeks, the Native Client team is inviting you to bring them on! We're challenging you to find security exploits in Native Client. Sign up today for the Native Client Security Contest, you could win up to $ 213 , as well as recognition from renowned security researchers.

Before getting started, you must complete the registration process for yourself or your team. Then, you can grab the latest build of Native Client, attack it to find security holes, and submit the ones you discover. You get credit for bugs that your team reports first. If another contestant submits a vulnerability before you, or we publish a fix before you report it, well then... you'll have to keep looking!

At the end of the contest, all entries will be reviewed by a panel of academic experts, chaired by Edward Felten of Princeton University. They will select the five eligible entries with the most high-impact bugs, and these winners will receive cash prizes, as well as earn bragging rights. For more details, please review the contest's terms and conditions.

Registration is now open and the contest will run until May 5th. Sign up today to start reporting exploits as soon as possible.

Happy bug hunting!

Tuesday 24 February 2009
Facebook StumbleUpon Twitter Google+ Pin It

Go beyond the free limits on Google App Engine



We just announced that developers can now grow their applications beyond App Engine's free limits that have been in place since it launched last year.

The pricing for resources beyond those free quotas is:
  • $0.10 per CPU core hour.
  • $0.10 per GB of incoming traffic and $0.12 per GB of outgoing traffic
  • $0.15 per GB of data stored by the application per month.
  • $0.0001 per email recipient for emails sent by the application
For more detail, check out the post in the App Engine Blog.

Friday 20 February 2009
Facebook StumbleUpon Twitter Google+ Pin It

Developer Preview Releases for the Visualization API

By Nir Bar-Lev, Google Product Management

We are now offering Visualization API developers an opportunity to preview upcoming release candidates.  Developers can opt in to these bleeding-edge builds simply by changing one line of code when loading the Visualization library.

Developers can use these release candidates as an opportunity to see what new features being developed, test upcoming changes in their applications in advance, and provide the Google team with valuable feedback on the Visualization API discussion group.

More details of the new process can be found in our Release Notes documentation.  And please be sure to check out all the available visualizations and new Tools Gallery while you're there.

We hope to see you at Google I/O in May where we will be hosting several sessions to teach you how to be more productive than ever with the Visualization API.

Wednesday 18 February 2009
Facebook StumbleUpon Twitter Google+ Pin It

Now playing: developer-created videos



In the last few months, we've posted videos of developers sharing how they built their applications with Google developer tools and technologies. These included developers building their AJAX front-ends with Google Web Toolkit, writing mobile apps for the Android platform, and scaling their web apps with App Engine. We really enjoyed working with these developers to produce these videos. However, we thought it would be great to allow any developer to create their own video talking about their application and help them share their video with other developers on code.google.com.

Today, we're happy to announce that we're now accepting developer-created videos through this video submission page. If you've got a great app built with Google developer products and want to be considered to be featured on code.google.com, all you need to do is:
  1. Check out these instructions and guidelines
  2. Create a short video (or videos) based on the above guidelines and upload it to your YouTube account.
  3. Submit your video details on the submission page.
  4. We'll be reviewing submissions regularly and selecting videos to feature on code.google.com and/or our developer blogs.
You don't need professional equipment or even a studio to produce a good video. Here are 2 examples of videos created by developers. Note that both were shot with hand-held video recording devices and basic video editing software. And as you can see, the "sets" used are just their own workspaces:

Jimmy Moore, developer of Mibbit:



Best Buy's Giftag.com, which was recently featured on this blog:



Ready to tell us your story? Visit the submission page to get started.

Friday 13 February 2009
Facebook StumbleUpon Twitter Google+ Pin It

CakePHP Routing With Parameters

Here is an example to illustrate routing with parameters.

/config/routes.php
Router::connect(
    '/:controller/:year/:month/:day',
    array('action' => 'index', 'day' => null),
    array(
        'year' => '[12][0-9]{3}',
        'month' => '(0[1-9]|1[012])',
        'day' => '(0[1-9]|[12][0-9]|3[01])'
    )
);


Parameters can be access like this:

/controllers/controller.php
function index(){
    // params is stored in $this->params
    $year = $this->params['year'];
    $month = $this->params['month'];
    $day = $this->params['day'];
    
    //
}

Parthiv Patel
Bhaishri Info Solution
Sr. PHP Developer
Limdi Chowk, AT PO. Nar, Di. Anand
Nar, Gujarat
388150
India
pparthiv2412@gmail.com
7383343029
DOB: 12/24/1986

Increase Performance of Loop with Large Arrays

In PHP, this is how we usually loop through arrays:



<?php
for ($i=0; $i<count($big_array); $i++){
 //
}
?>


Having this approach, program will try to count the $big_array every time it loops and it may cause some performance issues. To make it more efficient, we should code it this way:



<?php
for ($i=0, $n=count($big_array); $i<$n; $i++){
 //
}
?>


It does the counting during initialization only.
Parthiv Patel
Bhaishri Info Solution
Sr. PHP Developer
Limdi Chowk, AT PO. Nar, Di. Anand
Nar, Gujarat
388150
India
pparthiv2412@gmail.com
7383343029
DOB: 12/24/1986

Thursday 12 February 2009
Facebook StumbleUpon Twitter Google+ Pin It

How to Route Admin Actions in CakePHP 1.2

This is how to setup the routing:

Router::connect('/admin/:controller/:action/*', array('admin'=>'true','prefix'=>'admin', 'controller'=>'controller', 'action'=>'action'));



Parthiv Patel
Bhaishri Info Solution
Sr. PHP Developer
Limdi Chowk, AT PO. Nar, Di. Anand
Nar, Gujarat
388150
India
pparthiv2412@gmail.com
7383343029
DOB: 12/24/1986

Indenting Tree List in Form Input Select using '&nbsp;' as spacer

This is the scenario in cakePHP 1.2.

In your controller, you have an action:

function add() {
 ... 
 $categories = $this->Listing->Category->generatetreelist(null, null, null, '&nbsp;');
 $this->set(compact('categories','keywords','metros','states'));
}

where '&nbsp;' is your spacer.

Your view will have something like this:
...
echo $form->input('Category');
...

The above combination will display a drop down menu with the '&nsbp;' printed as '&nbsp' and not as a space. So how would you do it in cakePHP 1.2?

The key here is in the view file.

instead of the above statement, you should have this:
...
echo $form->input('Category', array('escape' => false));
...
Hope this one helps.


Parthiv Patel
Bhaishri Info Solution
Sr. PHP Developer
Limdi Chowk, AT PO. Nar, Di. Anand
Nar, Gujarat
388150
India
pparthiv2412@gmail.com
7383343029
DOB: 12/24/1986

Monday 9 February 2009
Facebook StumbleUpon Twitter Google+ Pin It

John Resig: Drop-in JavaScript Performance



Although Mozilla is right across the street, their JavaScript evangelist, John Resig, hails from Boston. When he comes to town, it's a great opportunity to learn about his current explorations in the world of JavaScript. I was fortunate to be able to host him for a Google tech talk last week. The video and slides are now available. In addition to his evangelism role at Mozilla, John is the creator of jQuery and Dromaeo, author of Pro JavaScript Techniques, and member of the Firebug Working Group. He's currently working on Secrets of the JavaScript Ninja, due out sometime this year.

In this talk, John starts off highlighting why performance will improve in the next generation of browsers, thanks to advances in JavaScript engines and new features such as process per tab and parallel script loading. He digs deeper into JavaScript performance, touching on shaping, tracing, just-in-time compilation, and the various benchmarks (SunSpider, Dromaeo, and V8 benchmark). John plugs my UA Profiler, with its tests for simultaneous connections, parallel script loading, and link prefetching. He wraps up with a collection of many other advanced features in the areas of communiction, DOM, styling, data, and measurements.



Wow, a lot of material to cover in one hour. An added benefit of having this talk given at Google is the questions from the audience. At one point, a member of the Google Chrome team goes into detail about how parsing works in V8. Many thanks to John for sharing his work and insights with all of us.

Friday 6 February 2009
Facebook StumbleUpon Twitter Google+ Pin It

Staying up to date with Google Code



As the number of developers and projects have grown on Google Code, we've started thinking about how to get projects to learn from and work with each other. Today, we're happy to announce that we have made a few steps towards that goal.

First, we've added user update streams to make it easy to see what a particular user has been doing across Project hosting on Google Code. As an example, take a look at Ben Collins-Sussman's activities on his profile page. Ben works on Google Code, but it's obvious that he has other interests as well.

In addition, tracking open source projects and other developers is as easy as starring a project or a developer profile. Starring a project or developer adds a link in your new "Starred Projects" and "Starred Developers" section of your profile page, making it really easy to find those projects or developers again. Starred projects are also added to the new "My projects" drop-down, which makes it easy to navigate to a project from anywhere on the site.

Once a project or a developer is starred, all updates from starred projects and developers can be tracked by looking at your personalized updates.
For those that prefer to use their feed reader, use the following new feeds:
  • Updates for a user - http://code.google.com/feeds/u/{username}/updates/user/basic
  • Developers a user is tracking - http://code.google.com/feeds/u/{username}/updates/projects/basic
  • Projects a user is tracking - http://code.google.com/feeds/u/{username}/updates/developers/basic
As always, we look forward to your feedback.

Thursday 5 February 2009
Facebook StumbleUpon Twitter Google+ Pin It

New! Caption files for Google Developer Videos



Last year, YouTube launched a Captions and Subtitles feature. In addition to launching a new playlist for captioned Developer Videos, we're also kicking off an Open Source project to host caption files that anyone can reuse under the terms of the Creative Commons 3.0 BY license.

We're hoping that developers will come up with interesting uses for caption data, once it's in the public domain. You can use transcripts as a corpus for training speech-to-text algorithms or testing applications that read and write caption files. Or, combine timepoint data with YouTube's URL support to jump to a specific point in a video.

Caption tracks make YouTube videos accessible to a wider audience. For example, try a search on [RESTful protocol YouTube] and you'll find search results from the captions on Joe Gregorio's recent talk.

While we're delighted that Kevin Marks' captioned English accent can be more easily understood by Americans, we've also translated the caption files and provided tracks in multiple languages for a few of our captioned videos. For all other videos, YouTube can perform Auto-Translate on caption text using Google Translate technology.



To learn more about YouTube caption file formats, take a look at the YouTube Help Center. If you're interested in contributing caption files for videos on Google channels, or making translations available, please consider joining the project.

We hope you'll find these additions useful. Happy reading!

Tuesday 3 February 2009
Facebook StumbleUpon Twitter Google+ Pin It

Project Hosting Upgraded to Subversion 1.5



We're pleased to announce that the Subversion component of Google Code Project Hosting has been upgraded to version 1.5. What does this mean to users? If you're using a Subversion 1.5 client, you can now take advantage of Subversion's improved "merge tracking" feature to manage branches.

Prior to Subversion 1.5, branching wasn't very friendly to users. A developer had to manually keep track of the revision from which a branch was copied. She also had to keep track of exactly which changes had been merged into a branch already (to avoid repeated application of changesets), and to always specify the exact range of revisions to merge next. Merging a branch back to trunk was even more difficult, since it required comparing two precise URLs in a very specific way.

With improved merge-tracking, users never have to type a single revision number. Here's a basic example of branch workflow.
  1. Make a branch for your experimental work:
    $ cd trunk-working-copy
    $ svn cp trunkURL branchURL
    $ svn switch branchURL

  2. Work on the branch for a while:
    # ...edit files
    $ svn commit
    # ...edit files
    $ svn commit

  3. Sync your branch with the trunk, so it doesn’t fall behind:
    $ svn merge trunkURL
    --- Merging r3452 through r3580 into '.':
    U button.c
    U integer.c
    ...
    $ svn commit

  4. Repeat the prior two steps until you’re done coding.

  5. Merge your branch back into the trunk:
    $ svn switch trunkURL
    $ svn merge --reintegrate branchURL
    --- Merging differences between repository URLs into '.':
    U button.c
    U integer.c
    ...
    $ svn commit

For a more detailed discussion of merge-tracking (and its limitations), see chapter 4 of the online Subversion Book. Live in fear of branches no more!

Monday 2 February 2009
Facebook StumbleUpon Twitter Google+ Pin It

App Engine Developers - Best Buy's Giftag



We're constantly impressed at the wide range of applications developers are building with Google developer products. One great example is Giftag, an online gift registry and social sharing application created by the Best Buy social media team. Giftag was first developed on a different platform and launched at DEMO 08. After learning about Google App Engine, the Giftag development team decided to move Giftag on to App Engine and re-launched the application just in time for Black Friday.

In this video they created, the Giftag team shares their thoughts on why they chose to migrate Giftag to App Engine, the APIs they used, what they would like to see from App Engine, and tips on how to get started with App Engine. "Because of the technology of Google App Engine, it's superb about allowing you to scale something that's really popular and not having any cost of doing that." - Curtis Thompson, Giftag Lead Developer



To learn more about Google App Engine, check out our documentation, subscribe to our blog and join our growing community.