Showing posts with label Week One. Show all posts
Showing posts with label Week One. Show all posts
Saturday, April 7, 2012
Viewing Predictions and Making Bids!
We now have an admittedly clunky interface to look at the current predictions and make bids on them via PHP/Postgres. We will eventually have more questions than the ones posted now. Take a look at http://ugcs.caltech.edu/~alexf/test.php.
Friday, April 6, 2012
More Website and Postgres Stuff
Website now automatically adds users to the users database. Right now, for testing, it also prints out a list of all users and their stats.
Website also lists the predictions a user owns, but the database is still empty, so there's no way to test it yet.
Added a new page to add or remove predictions from the database as well as list all predictions.
Website also lists the predictions a user owns, but the database is still empty, so there's no way to test it yet.
Added a new page to add or remove predictions from the database as well as list all predictions.
Thursday, April 5, 2012
Some cosmetic changes
We added some cosmetic changes to our blog, as you can see (template logo), and to our app - now we have a kinda tabbed interface. Considering another AJAX solution, look at http://ugcs.caltech.edu/~alexf/ajaxdemo. Still need to brush up some PHP/JavaScript/figure out this Facebook API to continue on with our grand quest of predicting the future and making this thing useable... Now working on a template for the prediction page.
As usual, you can check out the app at http://ugcs.caltech.edu/~alexf/test.php
As usual, you can check out the app at http://ugcs.caltech.edu/~alexf/test.php
Wednesday, April 4, 2012
Progress on Database and Website: Friendslist
Now able to retrieve friends lists of users at http://ugcs.caltech.edu/~alexf/test.php.
Used http://developers.facebook.com/docs/reference/api/ to learn how to extract the information.
Created tables with php and postgres according to schema in previous blog post. Four tables named "users", "owned", "bids", and "predictions". It turns out that the Postgres on UGCS is not fully up-to-date. We didn't check for sure, but it seems to be ~8.1, not 9. Also have a page with buttons to create and delete them for testing purposes. Link not given.
Used http://developers.facebook.com/docs/reference/api/ to learn how to extract the information.
Created tables with php and postgres according to schema in previous blog post. Four tables named "users", "owned", "bids", and "predictions". It turns out that the Postgres on UGCS is not fully up-to-date. We didn't check for sure, but it seems to be ~8.1, not 9. Also have a page with buttons to create and delete them for testing purposes. Link not given.
Connecting with Facebook and Verifying Postgres
Using Alex's UGCS account, we were able to authenticate/authorize with the Facebook API, extracting the user ID. The Graph API is very useful for accessing this data. At the same time, we were able to access the Postgres database on UGCS by creating and dropping a table.
You can check out our Facebook test app at: http://ugcs.caltech.edu/~alexf/test.php
One interesting setback seems to be that UGCS does not support HTTPS since it lacks a trusted SSL certificate. Unfortunately, we will probably need to find a new location to host our site.
You can check out our Facebook test app at: http://ugcs.caltech.edu/~alexf/test.php
One interesting setback seems to be that UGCS does not support HTTPS since it lacks a trusted SSL certificate. Unfortunately, we will probably need to find a new location to host our site.
Week One Goals:
We intend to create the database and website; we want to have the basics of the website running by the next meeting on Tuesday.
The tentative schema for the database should be:
The tentative schema for the database should be:
User Table
UserID, Authentication, MONEY, Reserve, # correct?
Give money every day. (First bid of the day)
Prediction-User Relation
UID, PredictionID, # that they own (can be +, -, or 0)[, numSell, bidSell, numBuy, bidBuy]
Prediction-User Selling Buying Table
UID, PredictionID, datetime, buyBool, #that you want, price
Prediction Table
PredictionID, Section, Subsection, Question, ClosingDate, DecidingDate, FinalResult
Compute CurrentOdds with a function (as well as max Buy and min Sell)
SELECT max(bidSell) AS minSell FROM pred-usertable WHERE PredictionID = predID
SELECT max(bidBuy) AS maxBuy FROM pred-usertable WHERE PredictionID = predID
The website should include
- A home page, which should have a list of all predictions
- A page for each prediction with its individual stats
- A page for bidding on the predictions
- A page for each user's individual stats
For testing purposes we should fill the database tables with test data until we're ready to open them to the public.
Subscribe to:
Posts (Atom)