Start Here !

Welcome to my website. Find articles, presentations, tutorials, experiments on various technologies.

You can get in touch with me anytime at

r o m i n . i r a n i @ m i n d s t o r m s o f t w a r e . c o m

I am also active on Twitter – do follow me.

Posted in Uncategorized | Leave a comment

Tips on conducting Programming Workshops for Kids

I have conducted several programming workshops for kids and they have been an enriching experience for me. The kids of today are much smarter, eager to learn and raring to go.

This blog post captures a few tips/suggestions that I have found helps while planning/conducting a programming workshop for kids. This is by no means an exhaustive list but one that I believe will help. Do share your feedback/points to the list via the comments.

My workshops have focused on Programming with Scratch and Programming with Lego Mindstorms.

The tips/suggestions/points are given below in no particular order of importance. Each of the points is important in my opinion. Here we go:

Workshop Duration

The workshops that I conduct are usually around 2-3 hours. Keep some buffer but I recommend not going beyond that time. Plan out your topics accordingly and keep in mind that there could be something that may not get covered. You will get a sense of how it is going midway and be prepared to change course a bit. Don’t assume that the workshop will go perfectly as planned, so be flexible.

Understand the participants

You need to nail down the students who will be attending your workshop. By that I mean the age group of students, their current level of expertise with computers, any previous background with programming (yes, you will be surprised that there are students who actually knew what you were going to teach, more on that later) and so on. Be firm on the age group that you want to target based on your teaching material.

The age groups that I target are between 7-12 years. This age group can get tricky especially for the younger lot if they are not used to typing. So typically I go with tools like Scratch where you have to simply drag and drop graphical programming blocks onto a canvas and click on a “Play” button. Any environment that requires the kids to type is quickly going to turn into a disaster. So be aware of that.

Location Infrastructure and Dates

Identify the place where the workshop is going to be held. Speak to the host, if the event is being managed for you. I have conducted the workshops in my house, in proper meeting rooms (at hotels) and also in libraries.

Do visit the place in advance and not 30 minutes before the workshop is going to be held. The main problems I have encountered and which create serious issues during the workshops are:

  • Lack of power charging points. I have worked around these by carrying a few extra power extension chords.
  • Sitting arrangement is important. At times the chairs are too high or low for small kids. I have found that eventually a way is figured out and kids don’t mind keeping their laptops on well … their laps. They will be more resourceful that we can imagine but this is something you could plan out if possible.

The best days in the week that kids can attend your workshop is a weekend. I have found Sundays work best with a Saturday too.

Batch size

Keep the number of kids in a workshop to an absolute minimum that you can manage. If you are planning to do everything on your own, including responding to a kid as they have a problem trying out some program, you cannot manage more than 5-10 kids. Anything beyond that number will require either than an adult supervisor is there , who can manage about 4-5 kids per supervisor. Invite their parents to join in. That helps a lot.

Haul your own equipment and hardware

Not every place that you conduct your workshop will have every kind of support to need in terms of hardware. For e.g. you want to show your screen to the students and you need a projector. There are chances that there will be none or cannot be provided. Either you bring your own projector or in my case, I have even hauled my flat screen TV to the location. Carry enough USB drives, carry a spare laptop or two, power extension chords, any cables, internet dongles and more.

Consent

Parents of kids in the range of 7-12 years are definitely concerned about any photos or videos that you may be taking of their kids. These are valid concerns and you need to set the right expectations in terms of how you will be using the photos and so on. Do keep any cultural sensitivity in mind and play it safe. Distribute a Consent form that asks for a parent to give their name and sign a sheet that explains how you will be using the photos. The general idea is that you will not use the names of the students, you won’t tag them by name anywhere and in case you are taking a video, do clip out sections where the kid might say their name or something.

Multiple copies of software

I typically do the setup of the software at the workshop itself. I have found that sending instructions via email prior to the event does not result in most of the kids setting things up. We have to understand that the laptops that they bring along with them for the event most likely belongs to the parent and they might have a lot of questions as to what is being setup,etc.

But make sure that you carry multiple USB Drives and take into considerations that people might bring along a Mac / Windows / Linux laptop and expect that you can magically produce the installers for all the platforms. So be prepared on that front.

Anti Virus Software and faulty USB Ports

One of the biggest headaches is not able to setup the software on the kids laptop. It will eat into your time and no one is equipped to solve installation problems. But this is part and parcel and do expect things to go wrong.

The biggest culprits have been faulty USB ports, USB port disabling, Antivirus software and so on. Unless the parent can confirm what is going wrong with the laptop, there is nothing much you can do.

What has helped me in such cases is that I carry along a couple of spare laptops. And I tell the kids to relax and use those machines instead. In some cases, asking kids to share a laptop also works but do that carefully because at this age, it is not common to find kids willing to share things easily.

Keep Slides to a minimum or No Slides !

We all know how boring presentations can be. When you deal with kids in the age group of 7-12, you cannot expect them to focus on a presentation with slides and bullet points. I usually jump into the software straight away and there are really no slides to show. Even if you do have slides, keep it to showing slide and then immediately switching to something that the kids can actually see and try.

The pattern that works best for me is : Show a program, then ask them to try something and repeat that pattern. Keep them engaged with different things. Most kids cannot focus for more than a few minutes at a stretch, so be aware of that and plan out the exercises accordingly.

Embrace Chaos

Nothing will go as planned typically. This is not an adult audience that you are presenting to. So expect interruptions of all kinds, questions of all kinds that you will be forced to deviate and explain something that you planned a bit later and so on. Be prepared for the unstructured manner in which the event will move. There will be times where you will need to silence some kids and even situations where the kids will stand up, move around and do something unrelated to the event. Just deal with them there and then in some way. I do not have a magic remedy for such situations otherwise I would have written a multi-million dollar bestseller book.

Let there be Sound

If the programming environment that you teach is going to have some sound samples with a play button somewhere in the IDE, expect the kids to find that out before you get to explaining it. The result : a cacophony of sounds with absolute disregard for the teacher. That is fine. Learn to laugh, tell them that you are glad they have found how to do it and just go with the flow.

Immediate Attention Syndrome

Kids are used to receiving immediate attention and your workshop will be no different. There will be questions asked at the same time, everyone will call you to address the issue immediately and so on. Learn to set the rules at the beginning itself and keep reminding that kids that you will come to them, once you are done addressing the current kid and so on. Just be firm there and they will understand.

Volunteers are a godsend

Just accept that you need as much help as you can from volunteers. It is difficult to manage more than 5-6 kids on your own at times. Volunteers who are familiar with the stuff that you are trying to teach helps a lot. At times the questions are not related to the matter i.e. it could be that the kid is clicking somewhere else, etc. So the volunteers can sort small things like that out without requiring too much technical knowledge.

Usually, you can expect a volunteer to address 4-5 kids at the time. I have been very lucky to receive support from my wife, who addresses issues as they arise. Even though she is not a technical person, she can help out easily because usually it is question of following instructions.

Be Early

This is a golden rule. Be at the location as early as you can. There could be a few surprises thrown in that are beyond your control and if you have some extra time on your side, you can probably address them. Being early at the location also helps to calm down any nerves and helps  you focus on the task at hand.

The Workshop will usually start late

Despite your best efforts, participants will arrive late, there will be some seating confusion and a set of things that will ensure that you cannot start your workshop on time. Don’t stress about it. This is not a life or death situation, it is a fun programming workshop for kids ! So take it in your stride and plan for it.

The workshop is also likely to stretch beyond your expected time because kids will get excited once they figure out things and they will ask you lots of questions and how do I do A or B or C and it goes on and on. Be aware of the time factor and at some point in time, mention that there is time only for one last project or task and wind up.

The Smart Kid Issue

There will an instance or two of very smart kids. It is very important that you consider how you will handle it. At times, it can be distracting because the kid might try to show off their knowledge. I always believe that if the kid is smart, I like to acknowledge it and encourage the kid more. But I do that in a manner that does not discourage other students who are still grappling with making things work.

I usually go down to the smart kid in the lot, encourage him/her to do a more challenging assignment and then allow him/her to raise the bar automatically.

Encourage Questions and Participation

There are flaws with our education system and we cannot be perfect. But one area that I sort of find very distressing is that several school teachers do not encourage questions to be asked. I think it beats the whole idea of education but since we cannot overhaul things overnight , we can still deal with it differently in our workshop.

I do make it a point to allow kids to ask questions and interrupt me. Understand that they are not a mature audience who will exactly understand what you mean by “Do interrupt me at any time, etc”. But allow the questions to flow. There will be one or two kids who will jump and ask a question or two. Encourage that, mention the question, praise the kid and answer it. You will find that most other kids will then start. No question is stupid at all. In fact, be prepared for some questions that will completely stump you.

Encourage Trying and Failing and Trying

The true joy of programming is not in getting everything right in the first try. Nothing every works on the first attempt and that is true of your workshop too. The kids will stumble, will make basic errors and more. Make sure that you encourage them that they are on the right track and that they can correct it, etc. Show them the path, explain it 2 times, 3 times and they will get it.

Instill the important fact in them that it is all about trying, working on it, failing, correcting it and so on. But put forth that message in a positive way. Use positive words instead of negative ones. They are very sensitive at this age.

Even when praising, do it in a subtle manner that others, who are a bit slow, do not feel left out.

Inattentive Students

I have even seen students who simply stop doing what is being told to them and do something else. Some simply start walking around the class. Some will play a game. Others will strike up a conversation and discuss current kids affairs. As long as you make sure that it does not disturb the rest of the class, let them go on. Try bringing them back on track but be mindful that you have a workshop to complete.

Photos

Do not forget to take photos. I have found that the best photos are taken when they are actually trying out things on the machine. The expressions are priceless and something that you can share with everyone.

Hand Outs – Material

It helps to keep a few handouts ready that the kids can follow during the workshop. These handouts should be well written and tested because you have a fairly young audience and they are not used to reading step by step instructions. So keep it simple but having good handout material is key to getting things done.

An excellent set of 1-page handouts are available at the Scratch cards. I laminated these cards and distribute them during the workshop. The kids finish one card and then exchange it with others. That way, they finish several projects during the workshop.

Have fun

“What is this life, if full of care, we have no time to stand and stare…” said W.H. Davies. Replace the words “stand and stare” with fun. Never compromise on the fact that you want the kids to enjoy the session and go back inspired to try and learn more. Keep things simple, have some laughs (even at your expense) and keep the fun factor high. Do use examples that are easy , fun and entertaining for the kids. Keep some jokes handy too.

All the best for your workshop. Do share your tips.

Posted in Personal, Presentations | Leave a comment

My articles @ProgrammableWeb : January – March 2014

Here is the list of my articles published @ProgrammableWeb in the period : January – March 2014:

Posted in Personal, Publications | Leave a comment

Speaking Engagements in March 2014

March has been a great month for interacting with various Google Developer Groups across the country. I was privileged to speak at 3 key events organized by GDG Groups in Cochin, Ahmedabad and Mumbai.

Last month (Feb), I spoke at the Dart Flight School event in Mumbai. And this month, we went a step further with both an “Introduction to Dart” and “Dart Code Lab” that was held in GDG Cochin. For more info, refer to my blog post.

Dart Flight School   Learn Dart

The next event was in GDG Ahmedabad and this time it was one of the many Women TechMakers events that have been held across the world. I spoke on “Overview of the Google Cloud Platform”. The organizers were gracious to give me a big timeslot that enabled me to cover parts of Google Compute Engine, App Engine and Google APIs. The purpose of my talk was to demonstrate that if you have an idea today and are passionate to convert the idea -> application, the cloud can be a great enabler, especially with the great set of infrastructure and tools that Google Compute Platform provides. For more info, refer to my blog post.

Google Developers

The last event for the month was held in Mumbai and once again it was the Women TechMakers edition that was organized by GDG Mumbai. I gave an overview of the Google Cloud Platform here too.

Home — Google Cloud Platform

Overall, a big thank you to Google India Developer Relations Team (Uttam & Shrey) for giving me the opportunities, respective GDG Organizers for inviting me to speak at their events and the enthusiastic community with which I can interact, share my experience and learn from.

Posted in Personal | Leave a comment

Women TechMakers Event – GDG Ahmedabad

I was privileged to be invited to speak at Women Technmakers Event, organized by GDG Ahmedabad on March 22, 2014.

Women TechMakers is an initiative by Google to ensure that there is visibility, community and resources available for women in technology. I believe that women have played a significant role in technology and it is important that in our industry, the percentage of women increases. It is going to benefit everyone.

The event in GDG Ahmedabad was a mix of technology and business. The event also highlighted women entrepreneurs who have excelled in the technology industry. Given that some of them were not technical to start with, but still persisted with their idea and passion to see that happen, is ample proof of what can be achieved. I personally believe that there is no difference between men and women. And to a certain extent I think holding events like these are important and I will be very glad if there will be no need to hold events like this in the future. It is up to each one of us to make that a reality.

The GDG Ahmedabad Event was held at Pride Hotel in Ahmedabad. I love the GDG Ahmedabad Team with Paresh Mayani, GDG Ahmedabad Head, a pleasure to work with. This was my 2nd visit to GDG Ahmedabad, having conducted a workshop last year on Google App Engine.

The event was kicked off by Rama Moondra, who gave an inspiring talk on “Women and Equal Opportunities”.

My talk at the event was about 90 minutes and I highlighted how the Cloud can help everyone spiral their ideas from inception to both economical and scalable implementation, which is also cost effective. My examples were that of Google Cloud Platform and Google App Engine, both of which I demonstrated. I was happy to demo spinning a VM on Google Compute Engine, install Apache, modify a page and show them a live site in under 5 minutes (network latency included! :-))

IMG_2955

We saw informative sessions following mine with real and successful models that Women Entrepreneurs like Ilaxi Patel, Ruzan Khambatta and Sneha Thakker have implemented. The talks were a mix of business and technology and the afternoon session saw talks on Project Management, Apponamics and more.

Check out the photos from the event 

Overall, it is a satisfying trip to Ahmedabad to interact once again with the GDG audience. I personally believe this chapter of GDG has some of the highest energy levels with a real zeal to learn and make the best of networking opportunity. I hope to be back again.

 

 

Posted in Personal | 1 Comment

Dart Flight School – GDG Cochin

I had the privilege of conducting Dart Flight School in Cochin on March 9, 2014. It was also the first anniversary of GDG Cochin and it is wonderful to learn about the activities that they had conducted over the last year and be part of their 1st anniversary celebration.

IMG-20140310-WA0015

We started off with Dart Language Basics and then the entire Dart Ecosystem with its tools. We took a look at several Dart language example code and then broke for lunch. Post lunch, we took off with the Dart Code Lab (Pirates Ahoy!). There were several goodies to be won for not just completing the Dart Code Lab but also for trying out something different, modifying the Dart Code Lab example and more. We saw a few attempts that took the Dart Code Lab code further.

Take a look at happy Dartisans at the end of the event:

1558408_279422732215889_613478823_n (1)

A big thank you to all members of GDG Cochin with special thanks to Sanjay Nediyara  and Rahul Ramesh (GDG Cochin – Organizers) for superb management of the event.

Posted in Personal | 1 Comment

Speaking Engagements – Feb 2014

February was a good month for interacting with developers across Mumbai. I was privileged to speak on a variety of topics across 3 sessions in February to over 250+ Developers in total.

The sessions were:

This was a marquee event held in Mumbai as part of the February campaign by Google to promote the Dart Language. I have enjoyed learning this language that makes the life of a Web Developer easier and love the language for its syntax. I was privileged to take the opening session on “Introduction to Dart” at the GDG Mumbai Flight School Event. There were between 160-200 people for the event and hope that some of them go back with an interest to learn more about Dart.

My Opening Session on Dart Language

The highlight for all of us at the event was an appearance by Kasper Lund, co-creator of Dart, who shared his insights on the language and took on Q&A from the event attendees.

Kasper Lund during his hangout

  • Rubix 2014 – Android & HTML 5 Workshops

I conducted a couple of developer workshops during Rubix 2014. Both the workshops were about 3 hours duration and introduced folks to Android Development and HTML5 APIs respectively.

Working with Developers is always a joy and especially when you introduce them to new stuff and see them taking those first steps to what these technologies / frameworks / languages help bring to the table.

I have an upcoming trip to GDG Cochin on March 9, 2014 to speak in their Dart Flight School Event. I look forward to that.

Posted in Personal | 4 Comments

Google Cloud Endpoints Tutorial – Part 7

Welcome to Part 7 of the Google Cloud Endpoints Tutorial.

The series so for:

  • Part 1 : We looked at writing a Google Cloud Endpoints class manually by using the various annotations and Exception classes that are available. We create a Quotes API that provided a JSON + REST based interface to manage Quotes (add, modify, delete and retrieve quotes).
  • Part 2 : We generated the Google Cloud Endpoints class from a JDO Annotated Entity class by using the Code Generation tools provided in the library.
  • Part 3 : Generated the Cloud Endpoints Client Library for Android and wrote an Android application that invokes the Endpoints API.
  • Part 4: We wrote a JavaScript client for our Endpoints API.
  • Part 5: Securing our API
  • Part 6: Calling a Secured API from a JavaScript client.

In this episode

So far in this series, we looked at writing a Quote API and in the last couple of episodes, we introduced how to secure your API methods so that only authorized clients can invoke the methods and we demonstrated how to make secure calls from our JavaScript client.

What do you need ?

  • You have a working development environment for Google App Engine. This includes the Google Eclipse plugin.
  • The API Project 2 (Quotes Endpoint Project) loaded in your Development Environment. This is the same as the previous episode.
  • You have a working development environment for Android. I have used Eclipse with the ADT Plug-in.
  • Basic understanding of Android Application Development. We will be using the same code that we had used in Part 3 : Writing an Android client.

My Development Environment

  • This remains the same, no changes at all. My development environment is given below:
    • Eclipse Juno
    • Google Eclipse plugin with App Engine SDK 1.8.8
    • Android ADT Plugin with latest Android SDK installed.
    • Mac + Windows machine (I kept switching from one to another, to keep everyone happy ;-))

Invoking the Secure API from Android client

In the last post, we had demonstrated how to make a secured call to the insertQuote method from a JavaScript client. In the Android version of that in this episode, we will be using the same code as we have used in Part 3, except that in the Add Quote Activity, we shall be modifying our code to make secured calls from the Android native application.

Let us first revisit the whole thing about Web Client Id and Audiences that we had setup for our Quotes API earlier.

Web Client Id

If you recollect, in the earlier episode, we had visit the Google Cloud Console for our project and create the OAuth Client Id. A screenshot of the Web Client Id is shown below.

Screen Shot 2014-02-14 at 8.45.01 PM

We created a Constants.java file that contained all these IDs as given below:

Notice that the ANDROID_AUDIENCE is what we are going to use here and it has been set to the same value as the WEB_CLIENT_ID.

Additionally, we had updated the @APIMethod for insertQuote and provided the clientIds, that included the Web Client Id and then deployed the API.

Again notice that we have specified the Client Ids that can access the insertQuote method and also mentioned the ANDROID_AUDIENCE in the audiences attribute.

Remember to regenerate your Client Libraries, just in case you have not done so and deploy it as needed. 

Famous Quotes Android Application Code

We are going to use the same code base as the original Famous Quotes Android application that was covered in Part 3I strongly suggest to go through that first to ensure that you have your Android application and all dependencies set up correctly.

If you want to download that source code, it is available here.

Play Services SDK

Since we are going to make an authenticated call from the Android client, the process will be that we will use the currently logged in Google Account on your Android device. Since this requires Account Picker and other classes on Android from the Play Services Library, it is required that you download the correct Play Services SDK and set that up as a library in the application.

Make sure you link up to the correct library depending on the version that you want to target. I tried out my code on a Android 2.3 device too and it bombed with the latest version of the Play Services SDK. As a result of which, I had to link up to a Froyo version of the library.

So, the first thing to do is to ensure that you have the Play Services SDK. For e.g. in the Android SDK Manager, you can see it over here:

cep7-1

Once you install (download) the above packages, they will be available in the ADT Folder\sdk\extras\google folder as given below:

cep7-2

Simply go to your Eclipse environment and Import any of the above projects as applicable. These are Android library projects and make sure you are able to import it successfully. 

Next, simply add the Play Services library project to your Famous Quotes Android application. The Properties page with the library linked up successfully is shown below:

cep7-3

This completes the development environment setup.

Let us look at the parts of the Add Quote Activity that we modified to ensure that the correct credentials are passed over behind the scenes while making the secure calls from the Android client.

AddQuote Activity Source Code

The entire source code for the AddQuote Activity is shown below:

Let us focus on the important parts and how the Account Credentials are setup before invoking the Secure Cloud Endpoints API.

  • Pay attention first to the onCreate(…) method. The code is identical to the earlier one where we setup the onclick listener for the AddQuote button.
  • There is a section starting with the comment //Account Stuff and there we create an instance of the GoogleAccountCredential class. We create that using the usingAudience method. Notice that the Audience Id string has to be created as follows “server:client_id:<AudienceId>
  • Once the GoogleAccountCredential instance is setup, we invoke the setAccountName method. This method uses Android SharedPreferences , to determine if an ACCOUNT_NAME String preference value was set. If yes, we set that account name for the GoogleAccountCredential instance.
  • We check in the next line if the name has been selected, if not – we invoke the chooseAccount() method, that starts the standard Account Picker activity on your Android phone. This will allow you either login or choose from one or more of your accounts on the device. Once selected, we invoke the setAccountName() method again to set the account name in the GoogleAccountCredential instance and set the value in the SharedPreferences too.
  • Now that the the GoogleAccountCredential is all set, the other change you will notice is in the AddQuoteAsyncTask.
  • In the doInBackground method, notice the following line:
    Quoteendpoint.Builder builder = new Quoteendpoint.Builder(
                    AndroidHttp.newCompatibleTransport(),
                    new GsonFactory(),
                    credential);

    Here, we are no longer passing null in the 3rd parameter. We are using the GoogleAccountCredential instance.

AndroidManifest.xml Permissions

We need to add some additional permissions to the AndroidManifest.xml file as given below:

Project Source Code – Download

The source code for the MyAPIProject2 is available in Github. You can download the entire source code over here.

Additionally, the source code for the secure FamousQuotes Android application is also provided over here.

This brings to an end, the series on Cloud Endpoints as I had originally planned out. Hope you liked the series so far. Give me feedback to help me create more and better content.

I do hope to blog about comparing Google Cloud Endpoints with other methods of writing Web Services along with some stuff that I would ideally like the next release of Google Cloud Endpoints to address both in features, samples and documentation.

Posted in Cloud Computing, Google App Engine | 2 Comments