Tuesday, December 2, 2008

Our Program

The cloud application that we will be using will be Google’s App Engine. Joseph has outlined in a previous post the method we will be using to post our application to the web. The application we have chosen is a random number generator game that has a user select a number that is between one and a hundred. The user will continue to guess a number until the number he or she selects is the same as the one the program has generated.

Cloud Computing

“Cloud computing is Internet-based ("cloud") development and use of computer technology ("computing"). The cloud is a metaphor for the Internet, based on how it is depicted in computer network diagrams, and is an abstraction for the complex infrastructure it conceals.[1] It is a style of computing in which IT-related capabilities are provided “as a service”,[2] allowing users to access technology-enabled services from the Internet ("in the cloud")[3]without knowledge of, expertise with, or control over the technology infrastructure that supports them.[4] According to a 2008 paper published by IEEE Internet Computing "Cloud Computing is a paradigm in which information is permanently stored in servers on the Internet and cached temporarily on clients that include desktops, entertainment centers, tablet computers, notebooks, wall computers, handhelds, sensors, monitors, etc."[5]
Cloud computing is a general concept that incorporates software as a service (SaaS), Web 2.0 and other recent, well-known technology trends, in which the common theme is reliance on the Internet for satisfying the computing needs of the users. For example, Google Apps provides common business applications online that are accessed from a web browser, while the software and data are stored on the servers.”

From: http://en.wikipedia.org/wiki/Cloud_computing



Cloud computing is great for software as a service(SaaS). The following from InfoWorld shows as much.

“This type of cloud computing delivers a single application through the browser to thousands of customers using a multitenant architecture. On the customer side, it means no upfront investment in servers or software licensing; on the provider side, with just one app to maintain, costs are low compared to conventional hosting. Salesforce.com is by far the best-known example among enterprise applications, but SaaS is also common for HR apps and has even worked its way up the food chain to ERP, with players such as Workday. And who could have predicted the sudden rise of SaaS "desktop" applications, such as Google Apps and Zoho Office?”

Tuesday, November 18, 2008

How to upload an Application on Google's Cloud

If you have an idea on creating an application for the web, look no further. It actually take a few simple steps to get your application on the web. First, you have to have a google account in order for upload your application. If you don't have an account, you can register from the homepage of Google. The second step to getting you application on the cloud is to go to the URL . Here, you can click on the "Create an Application" button which directs you to a webpage that gives you full instructions to create the application. After finishing the instructions, you must go back to your application program and type in the following command: appcfg.py update helloworld/ . Once you type and run this command, your application is upload onto the cloud for everyone to see. The link provided ( ) is another instructional on how to create and upload your own application.

Tuesday, November 11, 2008

Chapter 7

Alright, to be perfectly honest, I seem to be having a lot of difficulty with some of these programs that are in the book. I think I might be using the wrong GUI. I’ll bring my computer in to our meeting tomorrow so we can sit down and look at it. I also have a couple questions about chapter 5 and 6 that are bothering me.

In chapter 7, we are introduced to modules. Modules create a named scope for functions and data, but they are simpler than classes and objects. They let you separate your program into named pieces without having to use classes. Much of Pythons flexibility comes from its ability to use modules to expand its features. For example, there could be a networking module or an operating system module, etc.

In order to use a module, you have to first install it in the system. The easiest way to do this is to use the import command:

Import sys

This line will import the module named sys which contains services Python offers that mostly involve system-specific items.


To create a module, all you have to do is create a file with what you want to call it and the extension “.py”. In the book they use “Foods.py”. When we’re finished, we can import it using the name Foods without the extension. Below is a line of code that imports the Food module:

>>>import Foods
>>>dir(Foods)
[‘Fridge’, ‘Omelet’, ‘Recipe’, ‘_builtins_’, ‘_doc_’, ‘_file_’, ‘_name_’ ]
>>>

This lets us use the Fridge, Omelet, and Recipe classes. In order to access them now, we have to use Foods.Fridge, Foods.Omelet, and Foods.Recipe.

Tuesday, November 4, 2008

Chapter 6

Classes and objects are a major part of computer programming. In python, they serve as the same purpose as every other language out there. If you want to clarify a class, you need to type in the keyword, class. Lets make a class called Apartment.
class Apartment:

You must add a colon at the end of the statement. A common practice with Python programmers is to capitalize the first letter of their class. When you have more than one word for a class then you capitalize the first letter of the next word.

You can create objects very easily in Python. Once you create a class you can then create an object. This is done by usually assigning a letter to a class and assigning it blank parameters.

class Apartment:
r = Apartment()
(Note that we indent. As you work through as class, you must indent for it to work. Objects or methods cannot be underneath directly under your class. )

The primary setup of creating a class with method and objects go by.

Class
Methods
.
.
.
Objects

We learned earlier how to create methods by writing def in front of the method.
In order to get a full understanding of this chapter please look at the book. You must read the example in the book because it lays everything out. The example is really good if you forget how to do things we learned in earlier chapters.

Wednesday, October 22, 2008

Chapter 5

At the beginning of this Chapter, we learn how to make our code into a file. I will not touch up on this because it is just like saving any other type of file. The main focus of the chapter is along the lines of try and catch. This is the reason why I had trouble because I have not dealt with this in Java yet so it was all new to me. After speaking with Dr. Piercy, I started to understand this material. If you know how to use a try and catch, then this chapter will be easy for you. For those of you who don't, try and catch is a function you can use in Java. The try portion is along the lines of a method. You want the function to "try" and execute it. The Catch portion is the area where you right an exception to the action. An example of this is trying to hook up to a database. Your code could be perfect in the "try" area but you the file you are trying to reach isn't there. The catch functions catches that the file is up and you can have it return back to you as "Cannot connect to file." This is helpful because it saves you time looking at your code trying to find out what the problem is when really, your code is fine.
With this understanding we move onto Python. If you want to write out this try catch function this is how you can go abouts.

def in_fridge ();
" " " This is the comment area where you can describe your definition" " "
try:
count = fridge(wanted_food)
except KeyError:
count = 0
return count

The problem that I was running into was when entering this data, I kept getting errors. The example above is straight out of the book. What you must do is have your try and except line up with one another while the actions inside must be indented in. This is just a structure that Python abides by. I recommend you create your own example over and over to understand the structure and the set up.
With the definition above, you see that we put a parameter which is wanted_food. Say you wanted to find how many bananas were in the fridge. All you would have to type out is:

wanted_food = "bananas"
(You are assuming that you added values to fridge earlier. For instance, fridge = {"bananas" : 3, "oranges" : 4})

Thursday, October 16, 2008

Chapter 5 - Andrew

I'm with Joseph at the moment. I'm going to need a little more time reading and playing with Chapter 5 before I can post about it. I want to understand it a little better then I'll write about it.

I still need to post the schedule and about the difference between mutability and immutability. Also, I didn't know there was a meeting yesterday, I apologize for missing it.