Programming With Google Maps APIs – Part II

Hi! First of all, thank you for stopping by. It gives me strength to keep sharing what I like because I know it is all worth the effort. That being said, today, I am going to expand on what I did on Google Maps API part I by adding more features to our map. Last time, our map.js file has the following code:

(function () {
window.onload = function () {
var mapDiv = document.getElementById(‘map’);
var latlng = new google.maps.LatLng(37.09, -95.71);

var options = {
center: latlng,
zoom: 4,
mapTypeId: google.maps.MapTypeId.ROADMAP
var map = new google.maps.Map(mapDiv, options);

FREE Book Download From Amazon (True Story)

Hello! I apologize for taking a little too long to post something! I have been doing certain things (other side projects) and following the progress of my country’s election [Kenya]. I hope everything is going good for you.

Today(starting Wednesday 3/6/2013), I am going to give my book away for FREE on Amazon. I have been waiting for this for a while now and I figured I should do it now and then extend my reach to other platforms like smashwords and Barnes and Noble. So here is what I am going to do:

Object-oriented Programming In PHP – Part II

Yesterday I created a post on OOP and had to split it in two to avoid making it too long. Today, I am going to finish up the remaining part before starting other stuff! So, let us get started here.


Controlling Visibility Through Inheritance With private and protected

While writing code using OOP, you can use private and protected visibility modifiers to control what gets inherited. Attributes or methods declared as private will not be inherited. If an attribute or a method is marked as protected, it will not be visible outside the class (like private) but will be inherited. Example:

Reusing Code and Writing Functions – PHP

Hello! One thing you will hear everywhere you go as a coder is code reuse – the idea that if someone has already written some code that you need, you might want to consider using it instead of spending so much time writing from scratch. You could choose to repeat the process but your boss might not like it very much!

Storing Data Using Files in PHP – Shopping Cart

Hi! After adding some functionality to our shopping cart, I am going to do something different today: storage. Assuming we want to collect all the orders from customers and store them in a file somewhere for later use, we can easily create a file and write and read to and from it. I have altered the original look of our simple cart by adding a new input area for shipping address: Let us look at it now.


The Force Is Strong With This One

So, we are almost at the end of the journey here and I am so excited to do so. In my previous post, I demonstrated how to pick up the pieces from the returned data and put them into a single file. That was easy right?

The problem is that if someone else wanted to use my code, they would have to change parts of the code every time, which is not very smart! Today, I am going to put our code together, encapsulate it in a function that will take one parameter from the user and perform the tricks behind the scenes and boom, you get clean tweets containing the query keyword you entered. I know, I should stop talking and show you what I did:

Hone Your Powers – Part 2 (JSON)

In this challenge, we are required to perform some data parsing using JSON methods. Since I am going to use Python, I will be importing some libraries into my file and then make some real API calls to Twitter instead of using the provided JSON data.

I am going to do several things and still make this post as short as possible!

#perform some data parsing using json.
#make api calls to twitter servers
#### mozilla challenge – programming with twitter api

import urllib2 #python module for handling urls
import json #json anyone??

url = ‘’