Friday, June 10, 2011

Work Log: Fri, June 10

8:30
Arrived 8:20.
Started work on commented item.cgi
9:30
Matt Gallagher arrived.  Fixed database perms issue.  Polished customer.cgi.
10:30
Finished work on the item.cgi, shall start work on the loan interface.
11:30
Reading up on SQL.  It's good practice.
12:30
Creating new database.  Talked extensively with Matt about the design.
1:30
Finished making new database.  Now onto testing the new database, and setting up the loan system.
Demonstrating Shopping, discovered an error.  Fixed error.
Tested new database.  Existing pages now work with it, and have a 'go back' link.
2:30
I'm reading HTML code from a browser when trying to make the loans system.  I believe this is a unicode issue.

Thursday, June 9, 2011

Work Log: Thurs, June 8

8:30
Arrived.  New objective: test the Sid (debian testing) web2py package, which is current, and might have fixed the import problem.
9:30
The new version dosen't fix the import problem.  I'm going on irc to see how people feel about the problem.
CGI scripts might be the way that Elkner educates.  With a teacher explaining all the elements, it will be a very solid foundation for building other web app dev skills.
10:30
Still examining the web2py issues.
New objective: write a CD collection manager with SQL.
11:30
Objective changed: writing a loan management system.  I assume that this will need authentication.
12:30
This model will not have authentication.  Could loose authentication be done with passcodes, with the script only setting IsReturned to true if the user inputs a number matching a hidden, initially generated, number?
1:30
I did not know what I was doing with links.  I am fixing that.
2:30
Back to the check it out database.  Having difficulty, running cgitb to debug.
Checked out at 3:15.

SSH'd into students.gctaa.net at 4:10 to fix shoppinglist, which was broken.

Wednesday, June 8, 2011

Work Log: Wed, June 8

8:30
Arrived 8:25.  Began to work on the CGI script
9:30
Got the new CGI script syntax working.  Posts and adding posts works now.
10:30
Making a delete.CGI script.  it is not cooperating, because CGI scripts are evil.
11:30
With modified flat file syntax, and with significantly more difficulty than dealing with XML, I got the delete function working.  It still pretends not to, though.
It was also difficult to get the delete function to preserve usable syntax in the file.
11:53: I got the delete script working BEAUTIFULLY.  It redirects to the index, so it looks all oiled and dynamic.
12:15
Read through the web2py group email.  Began reading "how to think like a computer scientist."
Not having Compiz has made my time go to much more useful things.
Signed up for a free private beta of "python anywhere," if that makes me cool.
1:30
Looking at enabling a reload-based interface for posting from the index.  That will be prettier.
2:30
Got error handling up, and setup the smooth posting interface.

Tuesday, June 7, 2011

Continuing the Web2py Module Saga

A web search reveals that modules were being imported wrong.  instead of the standard method, one should use the import_local() function as shown here.
A source code comment very clearly explains what to do:

 In apps, instead of importing a local module
    (in applications/app/modules) with::


       import a.b.c as d


    you should do::


       d = local_import('a.b.c')


    or (to force a reload):


       d = local_import('a.b.c', reload=True)


    This prevents conflict between applications and un-necessary execs.
    It can be used to import any module, including regular Python modules.

However, it does not work in our implementation.  I'm going to figure out what it does and why by reading the source code.

Work Log: Tues, June 7

9:00
Didn't get in till 8:45, didn't start working until 9:10 -- after arriving in the classroom 9:00.
Work on quizzing app?  I can use XML to store scores now.
9:15
The mirror I used for the backport is gone.  I'll need to select a different one.
9:30
Backports now work.  Lesson learned: use mirrors with big names.
10:30
Mathquiz dosen't work because of current directory issues.  Looking at the web2py mailing list to gain understanding.
Reading through code to try and write an ugly kludge of a hack that will allow web2py to be used this summer, even without a proper fix.
11:30
Local_import is broken?  It seems that it becomes lost, too!
Is this function designed for standard installs?
1:00
Back from lunch.  CGI scripts must be implemented with SQL instead of XML to avoid file lock issues.
1:45
Right now, just making an implementation that works.  Since I've already coded the XML backend, it uses an XML backend.
2:30
Working on flat file formatting.  About as easy as XML.
Clocking out for the day.

Monday, June 6, 2011

Studies: Descriptions of Things And People Around Me

Classroom 208
My classroom is tidy.  All of the monitor cables trailing behind the computers are coiled neatly,  all the same direction, size of coil, and distance from the end of the cable.
All of the computers are named after phobias.
Stavros
A fish in water.  Back at YHS, I saw his hands seem little and shake while giving a presentation.
Here, his voice is relaxed.
Ballistophobia
The computer I work at lives in a corner, next to the bookshelf.  It itself can be used as a reference, with its wide screen easily displaying all information I'll need.
It's name appears to mean "fear of moving objects."
Anthony
"First name basis is fine.  You weren't a student during the year, right?"
Relaxed voice, shirt hangs casually.

Work Log: Mon, June 06

8:30
Arrived 8:35.
Shall work on Studies post and CGI scripts until Stavros gets in.
9:30
Researching XML.  What do I need to keep in mind while writing out XML with python?
11:30
Decided to abandon libraries for writing, and hard-code the simple XML I will be using.  Parsing might be done with a library.
12:30
Setting up the index, with parsing done by ElementTree.
1:30
Reading through documentation  to find the best way to get the item fields.
2:30
Figured out how to use ElementTree element methods.  Now XML will make my life easier instead of harder.