#GCDC – One Day to Go!

The first round of submissions for the Google Cloud Developer Challenge #GCDC closes (tomorrow) November 21.
If you are working on the #GCDC, here are some key links you should return to before making your submission:
#GCDC Frequently Asked Questions  – Very IMPORTANT
About the Challenge
The 20 Commandments of the GCDC
Two new ones for PHP Developers- 
Allowing Users to Upload Files on GAE 

http://devblog.gdglagos.com/2013/11/gcdc-php-allowing-users-to-upload-files.html

Enabling MySQL Support on Google App Engine 
http://devblog.gdglagos.com/2013/11/enabling-mysql-support-on-google-app.html

If you are submitting an entry, please enter my G+ profile link https://plus.google.com/+FemiTAIWO/  in the mentor part of the form:). Mentors get to win something too.
All the best.

#GCDC #PHP Allowing Users to Upload Files on GAE

Over the last two days, I have received emails asking for help on how to upload files on Google App Engine while building with PHP. Below is a step by step procedure on doing this.
Quick Note: Like Cloud SQL (MySQL) Database support, Google Cloud Storage is NOT free. But you can apply for the 2000 USD starter pack. Apply for the $2,000 worth of Google Cloud Platform credit here using the promo code: gcpdc-in.
  1. Go to https://cloud.google.com/console, Select your project
  2. Click on Settings
  3. Choose Enable Billing, Choose Your Country, Enter the required details, Then Click on Continue
  4. Enter your Card (ATM Debit Card) Details
  5. Click on Submit and Activate. This will now allow you to use the Google Cloud Storage features.
  6. Once done, go to 'Cloud Storage' on the left and click on "New Bucket". This bucket will hold your uploads. Keep the name simple.
Follow the code below for a general guide on things to do – 
  
<?php
/**
* For uploads to the Cloud Storage using PHP, The form must be submitted first to Google.
*
* All information on that form is sent to you.
*
*
*
*/
require_once 'google/appengine/api/cloud_storage/CloudStorageTools.php';
use googleappengineapicloud_storageCloudStorageTools;
$options = [ 'gs_bucket_name' => '__YOUR_BUCKET_NAME__' ];
$gooCs = new CloudStorageTools();
/*
__YOUR_UPLOAD_URL - when the user submits the form, this is where the file should be posted.
It is usually the value of the action attribute in your form tag .
 
$gaeFormUploadUrl this is the url you should put in the action tag.
*/
 
$gaeFormUploadUrl = $gooCs->createUploadUrl('__YOUR_UPLOAD_URL', $options);
 
 
/**
* Just process your $_POST and $_FILES data as you would,except for move_uploaded_file.
* The $_FILES['upload_field']['tmp_name'] actually holds your absolute, permanent path to the file in your Bucket.
* You should save that information in your database or datastore for future reference
*
*/
 
/*
If you need to get the URL to an image you uploaded, use the following method.
Use the size parameter if you want the image resized for you
*/
$gooCs->getImageServingUrl($gsUrl, array('size' => 400));
/**
*
*/
Happy Hacking.

Enabling MySQL Support on Google App Engine

If you are working on your #gcdc project and you want to enable SQL support, this blog post is for you. It involves many small steps.
Quick Note: Cloud SQL (MySQL) Database support is NOT free. But you can apply for the 2000 USD starter pack. Apply for the $2,000 worth of Google Cloud Platform credit here using the promo code: gcpdc-in.
This is a quick step by step procedure – 
  1. Go to https://cloud.google.com/console, Select your project and Click on CloudSQL on the left
  2. Click on Settings
  3. Choose Enable Billing, Choose Your Country, Enter the required details, Then Click on Continue
  4. Enter your Card (ATM Debit Card) Details
  5. Click on Submit and Activate. This will now allow you to create your database.
  6. Click on New Instance
  7. Enter an Instance Name. Your Instance Name is NOT your database. Think about it as a container for your database. You can create your database in step 9.
  8. Click on Save/Confirm
  9. If you want to run queries against your instance , click on "Return to Original Console" at the bottom of the page, Click on Google Cloud SQL and Choose the Instance. You will see a tab called SQL Prompt. You can run your 'Create Database xxxxxx' queries or other queries there.
  10. Alternatively, you can use your usual MySQL Browsers like SQLyog or MySQL Workbench or Toad or Navicat…. I haven't used any of these for my Cloud SQL account but you can look at this page for instructions –  https://developers.google.com/cloud-sql/docs/admin-tools
  11. For connection from your code, use the instructions on this page –  https://developers.google.com/appengine/docs/php/cloud-sql/ for PHP. Other languages –  https://developers.google.com/appengine/docs
I hope this has been helpful.

Lagos DevFest 2013 – Time Change + Predict & Win a Prize

Thank you for registering for this event. 

The DevFest is this Saturday November 16. Since Nigeria will be playing Ethiopia at 2pm same day, we've decided to start a little earlier – at 11am because of our many football lovers. We will be having a long lunch break from 2 to 3:45pmto watch the match in the cozy environment of the hub (thank you CCHub!) and we'll round off with a short and final session. 
 
We are also adding a twist to this – Predict the final scores of that match correctly and Win a One-Year subscription to PluralSight – a platform that offers more than 1000 Premium Developer and IT Courses. (Thank you Audax!) And you'll also get a free 3 month internet subscription bundle to boot :). 
 
The details on where to submit predictions will be shared at the venue. See you there and don't forget to put on your lucky hat.
 
Lest I forget, we will be having a small team of Google App Engine Veterans on ground to help anyone having problems with their Google Cloud Developer Challenge entry. If you are building for this challenge and need help, do come with your laptop.

 
Remember, the event will be starting at 11am. See you there.

The 20 Commandments of the GCDC

The first round closes November the 21st.
So let’s say that you’ve found that amazing idea you want to implement for the Google Cloud Developer Challenge and you may have even gone ahead to build most of it, it is important to keep some things in mind to ensure you’ve done a really good job with your ‘packaging’. So I came up with these 20 ‘commandments’ to help do this.

1. The URL MUST be in the following format:
https://gcdc2013-<app-name>.appspot.com
[more details here: http://www.google.com/events/gcdc2013/submit.html]

2. If you need MySQL support in your app, sign up for Cloud SQL and sign up for the free $2000 Google Cloud Platform Starter pack because Cloud SQL is not free (unless you don’t mind paying the small fees < 10USD/month for most fresh apps with a small database)
3. Create a two minute video that quickly describes what your app does. Avoid a click by click account.
4. Make sure your UI looks fine. Crappy does not sell. Crappy interfaces generally cause pain and invite low marks. Don’t/Can’t do UI design? Then look at layoutit.com, getbootstrap.com, getuikit.com, foundation.zurb.com for free ui frameworks that look simple and clean. There are TONS more out there.
5. Let the above the fold content on the homepage describe, in clear words what your app does.
6. In describing your app on site and in the submission form, remember you are selling a SERVICE, not just an APP with features. An app is a bunch of maybe kool features. A service describes how a (compelling?) need is fulfilled by the features the app provides.
7. Test test and test. The judges have LIMITED time to judge, so may not be patient enough to try again.
8. Once the submission round closes, don’t push new changes unless you’re practically absolutely sure it will not break it. You certainly don’t want to break stuff the same moment a judge is testing.
9. Done is better than perfect (something dear Truston says a lot). The submission date of November the 21st is final.
10. Let your app do one thing and let it do it very well. And that’s the one thing you should sell.
11. Minimum Viable Product. Get here at least. If there’s still time, go beyond it. Else, your submission is just that. A submission, not a ‘contestant’.
12. Check for spelling errors. Avoid Lorem Ipsumish stuff if possible.
13. If you are not using OAuth and people have to sign up traditionally, provide a demo account anyone can use to see what your app does. Put the details on the home page. Where it won’t be missed.
14. Content – seed your app. If you have to populate the database directly, don’t hesitate.
15. Remember the criteria for picking winners is as follows – 
– Effective Use of Google App Engine (Compulsory)
– All submissions must have an appspot.com domain
– Originality of Concept
– Relevance to Region (SSA, LATAM, India, SEA, MENA)
– Polish and Appeal
– Accessibility
– Usability on multiple screen sizes
– Indispensability: Is the application compelling and/or essential?
– Amount of user interactions on their app (comments, +1s, FB Likes etc)
– Google+ Sign-In / Integration (Not compulsory:Bonus Points)
– Creative use of Youtube and Google Maps APIs (Not compulsory:Bonus Points)
– Use of other Google platforms/APIs (Not compulsory:Bonus Points)
16. Pray.
17. Pray again.
18. Follow the GCDC hashtag on G+ and Twitter
19. Get an outsider to award you marks and let you know what he/she feels about what you’ve done. And areas that need improvement. Go after the low-hanging fruits.
20. Join the GDGLagos Mailing List 🙂 bit.ly/lagosgtuggroup and follow the 
P.S: If above there’s any phrase that you don’t really get, do a Google search with it….
All the best!

Join Us for the GDG Lagos DevFest

Join us as we dive deep into the latest and advanced developer platforms around  Android, Angular.js, Google App Engine, and Key Web Development Frameworks, interesting talks and code labs, to be presented by seasoned developers. There will also be help on hand for anyone having problems with their submission for the Google Cloud Developer Challenge.

Event starts at 12noon on Saturday November 16 at CCHub.

Event Sessions:

– Android: Android for Intermediate->Advanced Programmers

– Google App Engine: Get Ready, Set & Go. Building Amazing Apps Fast.

– Social Media Integration: Using Google+ and Other Key Social Media Platforms to Drive Engagement

– Advanced PHP Concepts

Google swags will be available for the first 50 attendees to arrive. 

Something to Work on this Weekend? Try on PageSpeed Insights for Size

When last did you check how optimized the html+css+js of your site was for performance? 
For me, that was quite a while back, so I decided to use the free PageSpeed – Insights tool.
Page Speed Insights measures the performance of a page for mobile devices and desktop devices. It fetches the url twice, once with a mobile user-agent, and once with a desktop-user agent. And gives your site a score in terms of performance on each platform – mobile and desktop.
The tool provides suggestions which will guide on what areas to change to improve performance. 
I spent about two hours tweaking  and touching one of our projects and I saw the scores increase by about 60%. That is terrific. I felt accomplished.
Naturally, my lab rat – funnyleni.appspot.com – is one I can easily talk about. It failed woefully on the first run. Scored 38/100 on mobile and 50/100 on Desktop.
With just a few tweaks though, that has changed. 
– Combined and minimized my css and js files. 
– Added Expires header via htaccess to my static files, 
– deferred scripts as necessary. 
– Minimized my html output – by removing excessive spaces, tabs and newlines in the output
Now it scores much better – 77/100 on Mobile and 85/100 on Desktop – 
I decided to also check out a few of our most popular local blogs, newspapers and sites…plenty of room for improvement. Most really plenty.
Meanwhile, once in a while, the PageSpeed Insights Tool fails to work and complains about a Backend Error, so I use the Google Chrome Plugin instead. It's just as useful with suggestions.
Happy tweaking.