th1a | Where is the sprint based? | 00:00 |
---|---|---|
th1a | Do you work in the Canonical offices now? | 00:00 |
SteveA | we're at a hotel in the middle of the canary wharf docklands wasteland | 00:00 |
SteveA | east london | 00:00 |
SteveA | i work from my apartment in lithuania most of the time | 00:00 |
th1a | I know you work in Lithuania ;-) | 00:01 |
SteveA | the canonical offices aren't in lithuania | 00:01 |
SteveA | so you confused me for a moment | 00:01 |
th1a | But the sprints aren't all in Mark's flat anymore. | 00:02 |
*** vmx__ has joined #schooltool | 00:02 | |
SteveA | no | 00:02 |
SteveA | not generally | 00:02 |
*** vmx_ has quit IRC | 00:02 | |
SteveA | if they're small, like 4 people, they're at the offices | 00:02 |
SteveA | for larger ones, they're at a hotel | 00:02 |
th1a | I see. | 00:02 |
th1a | Have you seen Helen King lately? | 00:02 |
SteveA | from TSF? | 00:02 |
SteveA | not in a while | 00:03 |
th1a | Yes. | 00:03 |
th1a | I've started working with her more closely, which is quite pleasant. | 00:03 |
SteveA | oh, good | 00:04 |
SteveA | i'm not really sure what she does, other than TSF stuff from the mossop st. offices | 00:04 |
SteveA | btw, the CoC is larger than that one paragraph | 00:04 |
th1a | She's the "international relations" person for TSF, so she ends up coming to things in the US pretty often. | 00:05 |
SteveA | people GPG sign it. i haven't signed the CoC yet, so I can still mouth off at people on irc and by email. | 00:05 |
th1a | She's on the short list of open source in education speakers now. | 00:05 |
th1a | :-D | 00:05 |
*** didymo has joined #schooltool | 01:16 | |
*** pcardune has joined #schooltool | 01:24 | |
*** GeekNoobness has joined #SchoolTool | 03:26 | |
*** NoobsGeek has quit IRC | 03:43 | |
*** ffsnoopy has joined #schooltool | 03:58 | |
ffsnoopy | pcardune: paul, are you available? | 03:59 |
*** SteveA has quit IRC | 04:15 | |
*** NoobsGeek has joined #SchoolTool | 04:34 | |
pcardune | ffsnoopy: hey, are you still here | 04:49 |
ffsnoopy | yes | 04:49 |
pcardune | what's up/ | 04:49 |
pcardune | ? | 04:49 |
ffsnoopy | when adding a new journal, how do I record the user who added it? | 04:50 |
pcardune | in the request object is a principle object | 04:51 |
pcardune | I think it is request.principle | 04:51 |
pcardune | there is an adapter from principle to Person | 04:51 |
pcardune | so you can do something like person = IPerson(request.principle) in the view class | 04:51 |
pcardune | let me look for some example code | 04:52 |
ffsnoopy | okay | 04:53 |
*** GeekNoobness has quit IRC | 04:53 | |
pcardune | yeah, i was right... | 04:56 |
pcardune | it is just IPerson(self.request.principal) | 04:56 |
pcardune | although that means you will have to adjust the view class for the addform | 04:57 |
pcardune | and override the create method | 04:57 |
ffsnoopy | oh, so it doesnt go in the __init__() func of journal? | 04:57 |
ffsnoopy | i cant do any 'request'ing from there? | 04:57 |
pcardune | no you can't | 04:58 |
pcardune | because Journal has no idea about this thing called the internet | 04:58 |
pcardune | it is just a data structure which stores data about journals | 04:59 |
ffsnoopy | hrm | 04:59 |
pcardune | the browser views however, are aware of the internet, and are the proper place to do stuff with requests | 04:59 |
ffsnoopy | so author has to be a Person object and not just a string username? | 04:59 |
pcardune | well, it could be a string username, since it is really easy to get the Person object from the username, | 05:00 |
ffsnoopy | good deal | 05:01 |
pcardune | but the biggest reason you don't want that, is so the user can't pretend to be someone else | 05:01 |
ffsnoopy | well i was thinking in the interfaces have a default field | 05:01 |
ffsnoopy | and then just dont show it in the add form | 05:01 |
ffsnoopy | althought interfaces probably have no clue about the internet too... | 05:02 |
pcardune | what would the field default to though? | 05:02 |
pcardune | precisely | 05:02 |
ffsnoopy | thats a problem | 05:02 |
pcardune | I mean, the only way you could conceivably do that is to have a hidden field in the addform which the user doesn't see, that is automatically set to their username | 05:03 |
pcardune | but they could still fudge it by sending requests manually (not through a web browser) | 05:03 |
ffsnoopy | how could they if its a POST and not a GET? | 05:03 |
pcardune | you can send POST requests just as easily | 05:03 |
ffsnoopy | oh | 05:03 |
ffsnoopy | yeah that makes sense | 05:04 |
pcardune | in any case, it will be a good experience to extend the AddView class to handle a special case like that | 05:04 |
pcardune | Just out of curiosity, are you running ubuntu/debian? | 05:05 |
ffsnoopy | yes | 05:05 |
pcardune | have you installed ctags? | 05:05 |
ffsnoopy | yup | 05:05 |
pcardune | good | 05:05 |
pcardune | I would suggest creating a tag file for the Zope3/src/zope directory | 05:05 |
pcardune | then going in there and searching for AddView | 05:05 |
pcardune | You will need to subclass AddView and override the create method | 05:06 |
ffsnoopy | bummer | 05:09 |
ffsnoopy | too bad things arent simple in the zope world | 05:09 |
pcardune | well, they actually are | 05:10 |
pcardune | if this were a regular zope app, I'd tell you to let the Dublin Core handle it | 05:10 |
ffsnoopy | maybe i just need to get used to it... | 05:10 |
pcardune | but schooltool works a bit differently | 05:10 |
pcardune | Once you get high enough onto the learning curve you begin to notice the incredible flexibility of zope and why things are the way they are | 05:11 |
ffsnoopy | probably | 05:11 |
pcardune | for example, I turned the zwiki content component that comes with zope into something that schooltool can recognize and fully interact with just by changing two configure.zcml files | 05:12 |
ffsnoopy | thats pretty cool | 05:12 |
pcardune | You can't do that with any other content management framework as far as I know | 05:12 |
*** pcardune has quit IRC | 05:29 | |
*** ffsnoopy has left #schooltool | 05:35 | |
*** Aiste|away has quit IRC | 10:30 | |
*** didymo has quit IRC | 12:46 | |
*** carljm has joined #schooltool | 15:03 | |
*** Aiste has joined #schooltool | 15:07 | |
*** carljm_ has joined #schooltool | 16:39 | |
*** carljm has quit IRC | 16:41 | |
*** ignas has joined #schooltool | 16:45 | |
*** carljm_ has quit IRC | 16:58 | |
*** carljm has joined #schooltool | 16:58 | |
*** jelkner has joined #schooltool | 18:08 | |
*** flint has joined #schooltool | 18:12 | |
flint | jelkner, Jeff how are you doing? | 18:12 |
jelkner | morning paul | 18:16 |
*** huynh has joined #schooltool | 18:17 | |
jelkner | good morning, linda | 18:17 |
huynh | morning | 18:17 |
huynh | what's that really random file that we're supposed to have in the separate folder? | 18:17 |
jelkner | timeclock-configure.zcml | 18:18 |
jelkner | which goes in zope3/etc/package-includes/ | 18:18 |
jelkner | and contains only: <include package="timeclock" /> | 18:19 |
huynh | thank you | 18:20 |
*** ignas has quit IRC | 18:20 | |
jelkner | huyhn: sure thing | 18:20 |
jelkner | huynh: btw, i just finished editing the summer intership commitment letter | 18:21 |
jelkner | it will take a day or two to get that approved, and then i need to get one to you | 18:21 |
huynh | okay | 18:21 |
huynh | I can tell you right now, though, that my work will be improved in the summer from lack of schoolwork | 18:22 |
jelkner | that will go for all of us ;-) | 18:22 |
huynh | because homework right now is killer | 18:22 |
jelkner | i understand | 18:22 |
jelkner | and that needs to come first | 18:23 |
huynh | it's unnatural for children to go to sleep after midnight just because of homework | 18:23 |
flint | huynh, it's unnatural for children to go to sleep... I have been a parent my dear... | 18:34 |
flint | :^) | 18:34 |
huynh | :) well, unlike most children, I like to sleep | 18:34 |
flint | huynh, linda, you are doing fine. I have always had great problems with homework, and this course is about par. | 18:35 |
flint | Basically I am totally lost in zope 3. It makes little or no sense. how about for you? | 18:36 |
huynh | since our teacher's not here, I can agree with you unconditionally | 18:36 |
huynh | but I'm getting the code and everything | 18:37 |
huynh | the placements of everything is what's confusing me | 18:37 |
flint | huynh, ah elkner is calling to yell at me... | 18:37 |
huynh | flint, have fun | 18:37 |
*** pcardune has joined #schooltool | 18:38 | |
huynh | hello, teach | 18:38 |
jelkner | morning teach | 18:38 |
pcardune | hello | 18:38 |
tiredbones | huynh, have you read anybooks on design pattern and XP? | 18:44 |
huynh | no, was this required? | 18:45 |
huynh | although there is a zope3 book in my comp sci class that I've skimmed through | 18:45 |
tiredbones | huynh, no but it would help in putting the pieces together. | 18:45 |
pcardune | i don't think i've read any books on design patterns or XP either, so I wouldn't worry to much | 18:46 |
*** ignas has joined #schooltool | 18:47 | |
tiredbones | huynh, if you can find a copy of Design Patterns by the GoF would help. | 18:47 |
huynh | GoF? | 18:47 |
tiredbones | pcardune, a while back you recommend the class read these materials. | 18:48 |
tiredbones | huynh, Gang of Four. | 18:48 |
carljm | there's also http://c2.com/cgi/wiki?DesignPatterns | 18:48 |
pcardune | well, it was really only if they felt the desire to know more | 18:49 |
pcardune | And i don't think i recommended any books | 18:49 |
flint | pcardune, there really is no way of logging out of manager once you are in it. You can shut down the server and the broser, but somehow that cookie is lodged in there. any ideas? | 18:57 |
jelkner | huynh: can you ask mr. c if you can take that book until the end of the summer? | 18:58 |
pcardune | flint: unfortunately no. We would have to set up an authentication service, and that is complicated | 18:58 |
jelkner | i had ment to ask you about that, but i forgot | 18:58 |
flint | pcardune, that is a very good and complete answer, thanks. there is no default authentication service beyond the manager role hard wired in at install. | 18:58 |
tiredbones | Is this site still being used http://ypal.net/zope3class/FrontPage | 19:00 |
*** wdickers has joined #schooltool | 19:00 | |
jelkner | good moring will | 19:00 |
pcardune | it is also a bit difficult because the authentication services aren't really explained in the current zope books. at least from the point of view that would be most useful to us. | 19:00 |
wdickers | morning | 19:00 |
flint | jelkner, technically it is good afternoon in EST. | 19:01 |
flint | :^) | 19:01 |
wdickers | Heh, by 1 minute | 19:01 |
pcardune | tiredbones: i believe we've moved it to http://ibiblio.org/obp/pyBiblio/courses/zope3class/ | 19:01 |
pcardune | ok, so is everyone here who is supposed to be here? | 19:02 |
pcardune | i'll assume "yes" | 19:04 |
flint | anyone who was not here would answer "No"... | 19:04 |
flint | :^) | 19:05 |
pcardune | ok, so I gave out some more homework last sunday | 19:05 |
pcardune | that asked you to write some new interfaces for the part of timeclock that would actually keep track of the time | 19:05 |
carljm | ok, i must be out of part of the communications loop still | 19:06 |
carljm | when/where did you give the homework? | 19:06 |
pcardune | carljm: I sent it out on the mailing list | 19:06 |
pcardune | jelkner: is carljm on the mailing list yet? | 19:06 |
carljm | i think i am, you must have sent it out right after class before i got on | 19:06 |
* jelkner goes to check the mailing list | 19:06 | |
carljm | ok, proceed - i'll catch up | 19:06 |
flint | pcardune, I got the assignment, elkner had mentioned putting the homework assignment on the wiki... | 19:07 |
pcardune | it might be on the wiki then | 19:07 |
jelkner | it isn't | 19:07 |
pcardune | anyways, I asked you to create three new interfaces: IWorkLog, IWorkLogEntry, and IWorkLogEntryContained | 19:08 |
pcardune | and to figure out what attributes should go into each of these interfaces | 19:08 |
jelkner | i know that wdickers did *all* of his homework | 19:08 |
jelkner | he showed it to me in class | 19:08 |
wdickers | I'm telling you I just copied Timeclock >//> | 19:09 |
jelkner | wdickers: but it worked! | 19:09 |
jelkner | that's actually a good thing | 19:09 |
wdickers | Heh, true | 19:09 |
jelkner | it means this is starting to make sense to you | 19:09 |
flint | wdickers, the whole directory? | 19:09 |
jelkner | and you can develop new things fast | 19:09 |
jelkner | flint: no | 19:10 |
flint | oh good, i thought I got it... now I feel better :^) | 19:10 |
jelkner | he means he copied IPerson, IPersonContainer | 19:10 |
flint | and person.py | 19:10 |
jelkner | yes | 19:10 |
wdickers | Heh, pretty much I just renamed stuff | 19:10 |
wdickers | And changed the attributes | 19:10 |
jelkner | yes, but know what to rename and how to change it is the whole point | 19:10 |
pcardune | well, let's look over what you did wdickers | 19:11 |
flint | create an object called WorkLog...including the stanzas of stuff in interfaces.py and configure.zcml | 19:11 |
wdickers | so...how should I show it? | 19:11 |
jelkner | flint: create an *interface* called IWorkLOg | 19:11 |
jelkner | s/IWorkLOg/IWorkLog | 19:12 |
pcardune | It would be ideal if you put it on the internet, but if that isn't easy, you can just paste it in here, although only do one peice at a time | 19:12 |
flint | jelkner, in interfaces.py and configure.zcml | 19:12 |
pcardune | let's start with IWorkLog | 19:12 |
jelkner | which goes in the interfaces.py file | 19:12 |
wdickers | class IWorkLog(zope.app.container.interfaces.IContainer): | 19:13 |
wdickers | """A container for work entries.""" | 19:13 |
wdickers | zope.app.container.constraints.contains(IWorkLogEntry) | 19:13 |
pcardune | flint: I only asked to create new interfaces, not to implement them or configure them | 19:13 |
pcardune | ok, this is correct, however it isn't quite complete | 19:14 |
jelkner | but wdickers did implement them | 19:14 |
wdickers | so what else do I need? | 19:14 |
jelkner | question: teach, is it time now to change the import to from zope.app.container.interfaces import IContainer? | 19:14 |
pcardune | besides just copying and pasting some variables, we want to think about the nature of our problem and what kind of things can be attributed to the new content components we come up with | 19:15 |
pcardune | jelkner: there is no "time" to do this, it is personal preference. It doesn't matter how you do it as long as it is explicit (meaning no from something import *) | 19:15 |
pcardune | as far as I know, there is no standard in place for imports | 19:16 |
pcardune | So, can someone tell me what the purpose of IWorkLog is? in full. | 19:17 |
flint | pcardune, will has created a container you can put what you want into... eh? | 19:17 |
jelkner | to store instances of "work", including when the work was done (start and finish) and what was done and what was learned | 19:17 |
pcardune | flint: you can only put object that provide IWorkLogEntry in to his container, not "what you want" | 19:18 |
wdickers | I thought you could only put in IWorkLogEntries as it's constrained | 19:18 |
wdickers | yay | 19:18 |
pcardune | jelkner: so then it doesn't matter who is doing the work as long as the hours are stored? | 19:18 |
flint | you both said the same thing. ok. | 19:18 |
jelkner | ahh yes, we need who did the work | 19:19 |
wdickers | Well wouldn't each person have their own instance of WorkLog? | 19:19 |
flint | wdickers, will I believe they will... | 19:19 |
jelkner | except that managers will want to see all work | 19:19 |
flint | if there is a mapping between the worklog and the person. | 19:20 |
jelkner | so there must be a way to look at all work logs together | 19:20 |
wdickers | So there should be some variable within IWorkLog that ties all the WorkLogs of a person together? | 19:20 |
pcardune | well, a person may have multiple work logs for multiple projects | 19:21 |
pcardune | you want to think about the intrinsic nature of the components we are creating | 19:21 |
jelkner | ahh a many to many relationship | 19:21 |
flint | there is a one-to-many relaton between persons and worklogs | 19:21 |
carljm | multiple work logs for an employee aren't in our use cases | 19:21 |
carljm | at least not as they stand | 19:21 |
pcardune | is having a work log instrinsic to the nature of a person? I would say no | 19:22 |
jelkner | carljm: good point, we don't have a story for that yet | 19:22 |
flint | pcardune, does the worklog contain all instances of work or just a single instance of work? | 19:22 |
tiredbones | pcardune, how would you have a eotk log without a person? | 19:22 |
pcardune | flint: neither, it contains many instances of WorkLogEntry, but not necessarily all instances of WorkLogEntry | 19:23 |
flint | pcardune, so it contains all work log entries for a given person or for all persons? | 19:23 |
pcardune | for a given person | 19:24 |
pcardune | well, here is how you should thing about it, let me outline it | 19:24 |
wdickers | I thought we didn't know as there could be multiple WorlLogs per person | 19:24 |
wdickers | **WorkLogs | 19:24 |
flint | wdickers, yea, that is what I thought as well. | 19:24 |
pcardune | ok, let me explain | 19:24 |
flint | that the worklogs were like job tickets, discrete | 19:25 |
pcardune | work logs contain work log entries | 19:25 |
pcardune | work log entries look like this (start time, end time, description of work done) | 19:25 |
pcardune | just like you would right down in a notebook | 19:25 |
pcardune | the notebook is the worklog | 19:26 |
flint | pcardune, paul, this is flawed in that it would not scale. if each worklog were discrete, they are more flexable. | 19:26 |
pcardune | each person will have one worklog for each project they are working on | 19:26 |
pcardune | are you saying that worklogs are continuous? how are they not discrete? | 19:27 |
flint | pcardune, think job tickets, they are able to be organized by project, or reviewed by a supervisor | 19:27 |
flint | job tickets can even be assigned. | 19:27 |
flint | imagine that each quanta of work is an individual thing | 19:28 |
pcardune | i'm afraid I don't know what job tickets are, but continue | 19:28 |
flint | and that thing has who what when where how info in it. | 19:28 |
wdickers | So...are you saying that each entry should not be within a WorkLog? | 19:28 |
carljm | flint: each "quanta of work" is an individual thing, a WorkLogEntry | 19:28 |
flint | and it is created or assigned | 19:28 |
flint | but it is not a notebook which is a collection of work quanta | 19:29 |
pcardune | flint: I think you are confusing WorkLog and WorkLogEntry | 19:29 |
pcardune | WorkLog is a collection of WorkLogEntries | 19:30 |
flint | the "job ticket" is a small quantity of work. in the past is is a WorkLogEntry, in the future it is an AssignedTask | 19:30 |
wdickers | I don't think we get assigned tasks, we just write down what we did and what we learned | 19:30 |
tiredbones | flint, job ticket don't close until the job is done. Keeping track of time worked end before the project is done. | 19:30 |
pcardune | I understand what you are saying, but you are breaking out of what our system is supposed to do | 19:31 |
flint | pcardune, that is the trap. if you create a WorkLog then WorkLog Entries are associated with this particular WorkLog for good | 19:31 |
pcardune | why is this bad? | 19:31 |
flint | pcardune, when you try to extend this for the purpose of assignment of work, it breaks. | 19:31 |
wdickers | No, you can create a worklogentry in whichever worklog you want | 19:32 |
jelkner | we have no story for assignment of work | 19:32 |
jelkner | yagni | 19:32 |
jelkner | (you ain't gona need it) | 19:32 |
jelkner | s/gona/gonna | 19:32 |
flint | jelkner, you need to consider this now. that is the point of design components. | 19:33 |
pcardune | flint: we could do it your way, but that becomes a far more complicated implementation which will be end up being more about knowing python than about knowing zope | 19:33 |
tiredbones | the relationship -- prodject to people people to work done. | 19:33 |
jelkner | flint: and we are not going to need it | 19:33 |
jelkner | if we do later, we add it then | 19:34 |
jelkner | so let's do the simplest thing that will work for our current problem | 19:34 |
flint | you considered it I get to do the ITYS later :^) | 19:35 |
pcardune | flint: we are not working with a relational database ;) | 19:35 |
flint | (I Told You So :^) | 19:35 |
jelkner | flint: fine | 19:36 |
pcardune | ok, so, back to the intrinsic nature of a worklog | 19:36 |
jelkner | in the mean time, i have happy customers with code they can see now | 19:36 |
flint | and happy students. | 19:36 |
jelkner | you have nothing to show them because you are building the complete, do all system that never gets finished | 19:36 |
wdickers | yeah, we got kind of sidetracked...please explain what you mean pcardune | 19:37 |
pcardune | assume someone is paying each of us for working on the timeclock application | 19:37 |
pcardune | each one of us will keep track of the amount of time we work on it seperately | 19:37 |
pcardune | so we will keep track of it in our own WorkLog | 19:38 |
pcardune | let's say some of us are also being paid to work on another project (like CanDo) | 19:38 |
flint | worklog entries in individual worklogs. | 19:38 |
pcardune | we will want to have a seperate WorkLog for the work we do for CanDo | 19:39 |
pcardune | so a Person can have more than one worklog, but a worklog can only have one person | 19:39 |
jelkner | why? | 19:39 |
pcardune | jelkner: because different people might be paying us, or because the boss wants to see the amount of money they are spending on each different project | 19:40 |
wdickers | what if two people were working jointly, would they still have 2 seperate worklogs for the same project and work? | 19:40 |
jelkner | wdickers: yes | 19:40 |
pcardune | wdickers: that is a very good question | 19:40 |
carljm | pcardune: shouldn't we update the user stories to reflect multiple worklogs per person? | 19:41 |
flint | pcardune, you have one WorkLog per person for many job assignments? | 19:41 |
carljm | currently they read as if each person only has one | 19:41 |
jelkner | pcardune: i'm here as the customer for this project | 19:41 |
jelkner | and as far as what i want, each person does have only one worklog | 19:41 |
jelkner | we should implement that now, and add other worklogs only if they become necessary | 19:42 |
tiredbones | pcardune, your system appears to have redundent data. | 19:42 |
jelkner | all i want is to be able to pay our developers | 19:42 |
jelkner | they all work for the same employer | 19:42 |
tiredbones | jelkner, you want more than that. | 19:43 |
jelkner | and all their work is paid from the same account | 19:43 |
jelkner | at least at this stage | 19:43 |
jelkner | we want a simple solution to a simple problem | 19:43 |
jelkner | and we want it fast | 19:43 |
pcardune | well, in any case, it still makes sense to have a WorkLog keep track of the Person it is attached to | 19:44 |
pcardune | and to keep WorkLog objects separate from Person objects | 19:44 |
pcardune | because again, WorkLogs are not an intrinsic part of the nature of a person | 19:45 |
flint | quote fromj above "jelkner we have no story for assignment of work" | 19:45 |
pcardune | you jelkner, as the boss, are not going to have a worklog, but you are still going to be a Person | 19:45 |
wdickers | So there will be a tie between the single Person object and all the WorkLog objects? | 19:45 |
wdickers | But right now the user can add as many Person objects as they want | 19:46 |
pcardune | so, some Person objects will be bosses/administrators, and WorkLogs will be attached to a particular person | 19:46 |
pcardune | wdickers: one work log to one person | 19:46 |
flint | wdickers, will by tie you mean relationship not even score eh? | 19:46 |
wdickers | flint: of course | 19:46 |
wdickers | pcardune: so we decided on a 1-1? | 19:47 |
carljm | so - do we make a person into a container for WorkLogs, or is there a better way to tie them together? | 19:47 |
pcardune | it really doesn't matter whether it is 1 to 1 or 1 to many, the implementation at this point, as well as the interfaces will be exactly the same | 19:47 |
tiredbones | pcardune, will one beable tp select a person an determine all the current prodjects there on? | 19:47 |
flint | tiredbones, there is only one project so the answer is yes. | 19:48 |
flint | tiredbones, all the current prjects are one project eh elkner? | 19:48 |
jelkner | yup | 19:49 |
pcardune | carljm: that would be one way... in fact is would be the simplest way in my mind, but not the proper way, we'll get into that later | 19:49 |
pcardune | so regardless of how many work logs a person might have, a work log will always have one person... does everyone agree with this? | 19:49 |
carljm | +1 | 19:50 |
huynh | yep | 19:50 |
wdickers | yup | 19:50 |
jelkner | si | 19:50 |
flint | se-se | 19:50 |
pcardune | ok, that is really all we have to worry about | 19:50 |
pcardune | so, going back to what wdickers wrote for IWorkLog, can anyone tell me what it is missing? | 19:50 |
wdickers | class IWorkLog(zope.app.container.interfaces.IContainer): | 19:51 |
wdickers | """A container for work entries.""" | 19:51 |
wdickers | zope.app.container.constraints.contains(IWorkLogEntry) | 19:51 |
jelkner | it has nothing about People? | 19:51 |
flint | a clearer doc line? | 19:51 |
jelkner | or rather IPerson? | 19:51 |
pcardune | jelkner: good, we need something that says implementations of IWorkLog should have some attribute for IPerson | 19:52 |
tiredbones | jelkner, I think you use adapters to tie them together. | 19:52 |
jelkner | are we going to have a containedBy requriement | 19:52 |
pcardune | no | 19:52 |
wdickers | jelker: but I thought pcardune said we wouldn't put WorkLog into IPerson | 19:52 |
flint | pcardune, thanks paul for not containing this in person. | 19:53 |
pcardune | flint: your welcome | 19:53 |
flint | pcardune, go on, the supsense is killing me... | 19:53 |
pcardune | what we want to do is add a zope.schema.Object attribute | 19:54 |
wdickers | why of course xD | 19:54 |
flint | pcardune, I knew that :^0 | 19:54 |
huynh | of course | 19:54 |
flint | lol | 19:54 |
pcardune | if you look at chapter 8 of the developers guide, (top of pg 58) you will see the Object schema attribute | 19:55 |
wdickers | I assume it starts like this: | 19:55 |
wdickers | person = zope.schema.Object( | 19:55 |
flint | ata girl linda | 19:55 |
pcardune | wdickers: that's right | 19:55 |
pcardune | it is just like all the other schema attributes except that it has an extra parameter | 19:55 |
pcardune | schema=IPerson | 19:56 |
wdickers | person = zope.schema.Object( | 19:56 |
wdickers | title = u"Personthingy", | 19:56 |
wdickers | description = u"Owner of WorkLog", | 19:56 |
wdickers | schema = IPerson, | 19:56 |
wdickers | required = True) | 19:56 |
wdickers | But don't we have to import IPerson at the top then? | 19:57 |
pcardune | wdickers: IPerson is already in this file (remember, this is interfaces.py) | 19:57 |
wdickers | Oh. I created a new package called work. Let me put this in timeclock then | 19:59 |
flint | and this is part of the class description? | 19:59 |
pcardune | flint: this is part of the IWorkLog interface which sould be in timeclock/interfaces.py | 19:59 |
flint | sorry the stanza begins with the word "class" | 19:59 |
flint | the stanza describing the interface | 19:59 |
pcardune | flint: that's true. If python had interfaces (like java) then there would be other keywords for it | 19:59 |
pcardune | flint: you can ask guido why there aren't interfaces in python | 20:00 |
jelkner | maybe there will be in python 3 | 20:00 |
pcardune | ok, so does everyone understand that? | 20:00 |
flint | pcardune, where within the interface class description do we put this reference to schema? | 20:00 |
tiredbones | pcardune, is this the only way to associate these components? | 20:01 |
pcardune | anywhere as long as it is in the interface definition | 20:01 |
pcardune | tiredbones: well, I'm not sure I would call it an association, and it isn't the only way, but it is the simplest way | 20:02 |
tiredbones | ok | 20:02 |
flint | so something like this: | 20:02 |
flint | class IWorkLog(zope.app.container.interfaces.IContainer): | 20:02 |
flint | """A container for work entries.""" | 20:02 |
flint | schema=IPerson | 20:02 |
flint | zope.app.container.constraints.contains(IWorkLogEntry) | 20:02 |
pcardune | sorry, i meant that schema=IPerson was a parameter for zope.schema.Object | 20:03 |
wdickers | class IWorkLog(zope.app.container.interfaces.IContainer): | 20:03 |
wdickers | """A container for work entries.""" | 20:03 |
wdickers | person = zope.schema.Object( | 20:03 |
wdickers | title = u"Personthingy", | 20:03 |
wdickers | description = u"Owner of WorkLog", | 20:03 |
wdickers | schema = IPerson, | 20:03 |
wdickers | required = True) | 20:03 |
wdickers | zope.app.container.constraints.contains(IWorkLogEntry) | 20:03 |
flint | oh ok | 20:03 |
pcardune | wdickers has it correct | 20:03 |
povbot | /svn/commits: * ignas committed revision 5821: | 20:03 |
povbot | /svn/commits: Make schooltool event edit form support events longer than 1 day. Make schooltool event edit form show sane units when displaying duration of events, not just minutes. | 20:03 |
pcardune | s/correct/correctly | 20:04 |
pcardune | everyone is on the same page yes? | 20:04 |
flint | wdickers, will how did you know to put a comma at the end? | 20:05 |
wdickers | at the end of each parameter? | 20:05 |
pcardune | flint: arguments in python are seperated by commas | 20:05 |
flint | pcardune, ah a list... | 20:06 |
pcardune | more like a tuple, but same difference | 20:06 |
povbot | /svn/commits: * ignas committed revision 5822: | 20:06 |
povbot | /svn/commits: Added support for importing of all day events from icalendar files. Added some missing tests for error checking in the icalendar parser. Merged read_icalendar and parse_icalendar into one function (this will be needed when i'll add icalendar timezone support) | 20:06 |
pcardune | ok, so if everyone is alright with the IWorkLog interface, we can move to the IWorkLogEntry interface. sound good? | 20:07 |
carljm | yep | 20:08 |
huynh | okay | 20:08 |
pcardune | ok, wdickers can you post what you have for IWorkLogEntry (so we can tare it apart again ;) | 20:08 |
wdickers | my version just has the times as textlines where the user inputs them (there's no format) | 20:08 |
wdickers | class IWorkLogEntry(zope.interface.Interface): | 20:08 |
wdickers | """A work entry.""" | 20:08 |
wdickers | sTime = zope.schema.TextLine( | 20:08 |
wdickers | title = u"Start Time", | 20:08 |
wdickers | description = u"Person's start time", | 20:08 |
wdickers | required = True) | 20:08 |
wdickers | eTime = zope.schema.TextLine( | 20:08 |
wdickers | title = u"End Time", | 20:09 |
wdickers | description = u"Person's end time", | 20:09 |
wdickers | required = True) | 20:09 |
wdickers | workDone = zope.schema.Text( | 20:09 |
wdickers | title = u"Description", | 20:09 |
wdickers | description = u"What s/he did", | 20:09 |
wdickers | required = True) | 20:09 |
wdickers | learned = zope.schema.Text( | 20:09 |
wdickers | title = u"What you learned", | 20:09 |
wdickers | description = u"What s/he learned", | 20:09 |
wdickers | required = True) | 20:09 |
wdickers | jelkner wanted me to put in the learned | 20:09 |
pcardune | that's a nice touch | 20:09 |
jelkner | but required can be False | 20:09 |
wdickers | for which ones jelkner? | 20:09 |
jelkner | learned | 20:09 |
pcardune | for learned | 20:09 |
wdickers | ok | 20:09 |
carljm | i used: | 20:10 |
carljm | start = Datetime( | 20:10 |
carljm | title=u'Start Time', | 20:10 |
carljm | description=u'The time work began.', | 20:10 |
carljm | required=True) | 20:10 |
carljm | imported zope.schema.Datetime | 20:10 |
wdickers | yeah, I don't know how the Datetime worked | 20:10 |
pcardune | carljm: that looks good | 20:10 |
wdickers | wait, don't you have to say zope.schema.Datetime? | 20:10 |
carljm | wdickers, at the top I have: | 20:10 |
wdickers | unless you said "import zope.schema.Datetime as Datetime"? | 20:10 |
carljm | from zope.schema import TextLine, Datetime | 20:11 |
wdickers | ah, okay | 20:11 |
pcardune | as far as variable names, i would like to combine what carljm and wdickers have so as to have startTime and endTime... just to be more explicit | 20:11 |
wdickers | heh, okay | 20:12 |
pcardune | we don't need to limit the number of characters in our variables because computers have a lot more memory these days... | 20:12 |
jelkner | and programmer don't ;-) | 20:13 |
jelkner | s/programmer/programmers | 20:13 |
pcardune | well this looks fine to me | 20:13 |
pcardune | what does everyone else thing of this model? | 20:13 |
flint | pcardune, this last bit goes into what file? interfaces.py? | 20:14 |
jelkner | once you explain Datatime to us, it will be great | 20:14 |
pcardune | (having 4 attributes: startTime, endTime, workDone, and learned, with startTime and endTime as Datetime attributes) | 20:14 |
ignas | well - we are usnig dtstart and dtend for such things in schooltool.calendar | 20:14 |
pcardune | flint: yes, all interfaces go into interfaces.py | 20:14 |
ignas | as it tells that it's not just datetime.time, but a datetime.datetime | 20:14 |
flint | pcardune, and Datetime returns current date and time. | 20:15 |
pcardune | Datetime is a great python package that manages, obviously, date and time | 20:15 |
jelkner | how can we learn about it? | 20:15 |
flint | pcardune, that i have used before | 20:15 |
pcardune | i would recommend looking in the python library reference | 20:16 |
pcardune | i'll get a link | 20:16 |
jelkner | http://docs.python.org/lib/lib.html | 20:16 |
pcardune | wow... did they just radically change the python website? | 20:16 |
jelkner | yes | 20:17 |
jelkner | during a sprint at pycon | 20:17 |
* tiredbones takes a look. | 20:17 | |
pcardune | oh man... i wish i had been there | 20:17 |
flint | jeff, how do you call the docs for datetime from the command line in python, it is something(datetime)... | 20:17 |
jelkner | next | 20:17 |
jelkner | next year | 20:17 |
pcardune | http://docs.python.org/lib/datetime-datetime.html | 20:17 |
pcardune | flint: you can do dir(datetime) | 20:18 |
flint | thanks forgot. | 20:18 |
pcardune | or you can do "import pydoc; pydoc.getdoc(datetime)" | 20:18 |
flint | na dir is fine | 20:18 |
wdickers | but how would Datetime work? I thought WorkLogEntry was like a journal entry, one that could be written after or during the actual working, how are the times correct? | 20:19 |
flint | pcardune, the pydoc is not detailed... | 20:19 |
pcardune | wdickers: I believe the way jelkner wanted it was for users to actually clock in and clock out | 20:20 |
pcardune | from when they start working to when they stop | 20:20 |
jelkner | yup | 20:20 |
pcardune | of course, this only works when they are online, and they don't forget to clock out | 20:20 |
flint | pcardune, Will has a point. can you set the form up so that it can be edited after the default current date/time is placed in the worklog? | 20:20 |
pcardune | yes | 20:20 |
pcardune | and that is in fact what we will do | 20:20 |
jelkner | we may have to add an edit time story | 20:20 |
jelkner | but later | 20:20 |
wdickers | how would that work, the moment you create that object the time is set...so how would it get the endtime as well? | 20:20 |
jelkner | wdickers: when you "clock in" (log in) a time is stored | 20:21 |
pcardune | in one of the views it would check whether endtime has been set or not, and if it hasn't it will there could be a button that says "clock out" | 20:21 |
jelkner | and when you "clock out" a log entry is created | 20:21 |
pcardune | these are good questions | 20:22 |
huynh | the window will be up the entire time you're working? | 20:22 |
wdickers | I'm still not understanding. So you cannot log in without creating an entry? | 20:22 |
pcardune | allow me to make a proposal | 20:23 |
jelkner | please | 20:23 |
flint | wdickers, yea but you could change the time once you were logged in. | 20:23 |
pcardune | when a user logs in, they will be taken to a screen showing the current state of their worklog | 20:23 |
ignas | pcardune, if it's not a secret what application is the code being developed for ? | 20:23 |
wdickers | true, but what if you were logging in for other reasons besides working? | 20:23 |
ignas | is it a part of schooltool ? | 20:23 |
pcardune | ignas: no, it is for the timeclock application, | 20:24 |
wdickers | pcardune: and they would have the /option/ of creating a new entry? | 20:24 |
pcardune | ignas: it's a project we are using to teach zope3 | 20:24 |
pcardune | wdickers: yes, that is what i was going to say | 20:24 |
jelkner | ignas: and to pay the Arlington Schools SchoolTool summer interns | 20:24 |
wdickers | oh, okay, that works for me | 20:24 |
ignas | pcardune, oh, i see, i guess you can find some usefull things by looking at mgedin's gtimelog then ;) | 20:24 |
pcardune | so they might log in just to take a look at how much money they have made so far so they can decide whether or not to buy that ipod... | 20:24 |
wdickers | exactly ;D | 20:25 |
pcardune | ignas: really? do you have a link, i didn't know he ever made such a thing | 20:25 |
flint | pcardune, making the worker resource aware is out of scope... | 20:25 |
jelkner | flint is right | 20:25 |
ignas | pcardune, it's not zope app, but the interface solutions can be usefull to you | 20:25 |
pcardune | ignas: sounds like it would be a good thing to look at | 20:26 |
pcardune | flint, jelkner, how is the worker resource aware? | 20:26 |
ignas | http://mg.pov.lt/gtimelog/ | 20:26 |
pcardune | all i'm saying is that there will be a page showing the current state of the work log, and the worker will be able to see that | 20:26 |
jelkner | timeclock doesn't know anything about pay | 20:26 |
jelkner | ok | 20:27 |
pcardune | oh, i see | 20:27 |
flint | what do you mean by "the current state of their worklog"? | 20:27 |
pcardune | well in that case replace "money" with "hours" and let the worker convert hours to money | 20:27 |
wdickers | nuuuu, math | 20:27 |
wdickers | flint: I think he means all the existing entries and their contents | 20:27 |
pcardune | flint: i mean, see the objects in the work log (the work log entries) | 20:28 |
flint | wdickers, republican arithmetic rathere.... | 20:28 |
jelkner | pcardune: i propose we keep the ui as simple as possilbe | 20:28 |
jelkner | when an intern first logs in to timeclock | 20:28 |
jelkner | they will see a "clock in" button | 20:28 |
jelkner | then to answer linda's question, they can go off and work, and even log out | 20:29 |
jelkner | the next time they login | 20:29 |
flint | pcardune, how bout a summary button? | 20:29 |
jelkner | timeclock will see that they have clocked in | 20:29 |
jelkner | and offer them a clockout option | 20:29 |
pcardune | jelkner: my proposal does keep it simpler | 20:29 |
pcardune | because we wont have to right an extra view for the clock in/clock out screens | 20:29 |
flint | pcardune, if you hit the summary button you see your whole worklog? | 20:29 |
jelkner | pcardune: but clockin and clockout screens are very different | 20:30 |
*** lhuynh has joined #schooltool | 20:30 | |
wdickers | shouldn't we get the basic objects and containers finished before we work on the layout? | 20:31 |
flint | jelkner, this summary feature would be useful for the boss... | 20:31 |
jelkner | the clockout screen requires you to fill in a text field (or 2) describing what you did | 20:31 |
jelkner | let's impliment this first, so we can begin trying it out | 20:31 |
pcardune | wdickers: thank you | 20:31 |
jelkner | fair enough | 20:31 |
pcardune | i only wanted to think about the user interface from the point of view of how/when WorkLogEntry objects would be created | 20:32 |
pcardune | from what we've discussed: | 20:32 |
pcardune | WorkLogEntry instances are created when the worker clicks a button | 20:32 |
pcardune | at that point in time, only the startTime is stored | 20:32 |
wdickers | does that mean endTime's required has to be False? | 20:33 |
carljm | pcardune: does that mean our other three attributes shouldn't be required? | 20:33 |
jelkner | does that run into conflict with the other "required=True" attributes? | 20:33 |
carljm | heh | 20:33 |
pcardune | good! | 20:33 |
pcardune | you are all on the same page | 20:33 |
wdickers | apparently | 20:33 |
pcardune | the answer is yes | 20:34 |
pcardune | so, we want the other attributes, besides startTime, to not be required | 20:34 |
jelkner | so we will need another way to make them required for clockout? | 20:35 |
flint | pcardune, why should any attributes be required | 20:35 |
flint | pcardune, they should be audited at "clockout" | 20:35 |
jelkner | in other words, clockout should fail if no work description is provided | 20:35 |
pcardune | right | 20:36 |
tiredbones | Time is a derive value from prodject | 20:36 |
pcardune | the proper way to do this would be with workflows, but we aren't there yet, so for now we will do this just manually with browser view classes | 20:36 |
flint | and they should make sense, is this not a widget function? | 20:36 |
tiredbones | s/prodject/poject/ | 20:36 |
flint | pcardune, the time recorded cannot be negative... (except in my case:^) | 20:37 |
pcardune | flint: keeping track of time will be automated for the clock out screen. it will just be the current time when they log out | 20:37 |
pcardune | the amount of time actually worked will be calculated (endTime-startTime) | 20:38 |
flint | pcardune, good, within scope. | 20:38 |
pcardune | ok, so can someone please post what the IWorkLogEntry interface should look like? | 20:39 |
lhuynh | the dates will be calculated, too, right? | 20:39 |
wdickers | class IWorkLogEntry(zope.interface.Interface): | 20:39 |
wdickers | """A work entry.""" | 20:39 |
wdickers | startTime = zope.schema.Datetime( | 20:39 |
wdickers | title = u"Start Time", | 20:39 |
wdickers | description = u"Person's start time", | 20:39 |
wdickers | required = True) | 20:39 |
wdickers | endTime = zope.schema.Datetime( | 20:39 |
wdickers | title = u"End Time", | 20:39 |
wdickers | description = u"Person's end time", | 20:39 |
wdickers | required = False) | 20:39 |
wdickers | workDone = zope.schema.Text( | 20:39 |
wdickers | title = u"Description", | 20:39 |
wdickers | description = u"What s/he did", | 20:39 |
wdickers | required = False) | 20:39 |
wdickers | learned = zope.schema.Text( | 20:39 |
wdickers | title = u"What you learned", | 20:39 |
wdickers | description = u"What s/he learned", | 20:39 |
wdickers | required = False) | 20:40 |
jelkner | lhuynh: yes | 20:40 |
pcardune | This looks good to me, is everyone else in agreement at this point? | 20:40 |
wdickers | wait, is endTime correct, since it's not going to be automatically created? | 20:40 |
pcardune | wdickers: it's correct | 20:41 |
wdickers | ok | 20:41 |
flint | pcardune, at this time do you need anything like this? | 20:41 |
flint | tTime = zope.schema.TextLine( | 20:41 |
flint | title = u"Total Time", | 20:41 |
flint | description = u"Person's time spent", | 20:41 |
flint | required = True) | 20:41 |
flint | just asking... | 20:41 |
pcardune | no | 20:42 |
flint | pcardune, this comes later in the process or is a calculation? | 20:42 |
pcardune | because we can derive this information from the attributes we already have | 20:42 |
flint | it is a calculation then. | 20:43 |
pcardune | flint: yes | 20:43 |
pcardune | so if everyone agrees with this, then we can look at the IWorkLogEntryContained interface | 20:43 |
carljm | class IWorkLogEntryContained(IContained): | 20:44 |
carljm | """A work log entry contained in a work log.""" | 20:44 |
carljm | containers(IWorkLog) | 20:44 |
pcardune | This looks good to me | 20:44 |
carljm | or zope.app.container.constraints.containers(IWorkLog) | 20:44 |
carljm | if you prefer | 20:44 |
wdickers | class IWorkLogEntryContained(zope.app.container.interfaces.IContained): | 20:44 |
wdickers | """A WorkLogEntry contained in a WorkLogEntryContainer""" | 20:44 |
wdickers | zope.app.container.constraints.containers(IWorkLog) | 20:44 |
wdickers | Heh, I have the longer ones | 20:44 |
jelkner | yeah, i think we should agree on the shorter ones | 20:45 |
wdickers | ok | 20:45 |
jelkner | it was my fault in the beginning for suggesting the longer ones | 20:45 |
pcardune | I think at this point everyone gets the idea with that | 20:45 |
jelkner | i apologize ;-) | 20:45 |
pcardune | ok, that is pretty much all we are going to finish today | 20:46 |
jelkner | next week, teach, you aren't here, right? | 20:46 |
pcardune | we have gone through a very important process in the development of zope components | 20:46 |
pcardune | jelkner: that's right | 20:46 |
lhuynh | who'll teach the class? | 20:46 |
jelkner | this was fun! | 20:46 |
jelkner | may i make a suggestion? | 20:47 |
pcardune | sure jelkner, although I think you are thinking what I am thinking | 20:47 |
*** huynh has quit IRC | 20:47 | |
jelkner | you give us an assignment which we can work on in class together | 20:47 |
flint | pcardune, where are you going off to next week? | 20:48 |
pcardune | camping in oregon until the end of my spring break | 20:48 |
pcardune | (which goes through sunday) | 20:48 |
flint | gotcha. sounds nice. | 20:48 |
jelkner | have fun | 20:48 |
lhuynh | have fun! | 20:48 |
tiredbones | pcardune, do you normalize the data when developing? | 20:48 |
wdickers | have fun | 20:48 |
pcardune | anyways, I will be gone from wednesday through sunday | 20:48 |
flint | email in some homework for me to get confused about please... | 20:48 |
tiredbones | pcardune, have fun. | 20:49 |
pcardune | tiredbones: what do you mean by normalize? | 20:49 |
jelkner | so, you can email us the homework | 20:49 |
pcardune | well, i'll send out an email and just tell you right now | 20:49 |
jelkner | and we can all be confused about it together next week | 20:49 |
pcardune | I want you to implement these new interfaces and even configure them | 20:49 |
lhuynh | that'll be fun to look forward to | 20:49 |
jelkner | (but wdickers and carljm will help us through it no doubt!) | 20:50 |
wdickers | mwahaha, I've almost done that...except for the system error I have u.u | 20:50 |
tiredbones | pcardune, they don't teach how to normalize data in school anymoer/ | 20:50 |
pcardune | tiredbones: ask jelkner, he is the one who taught me | 20:50 |
jelkner | tiredbones: zodb is not a relational database | 20:50 |
flint | oh I so wanted to be in first normal form.... | 20:51 |
tiredbones | jelkner, it doesn't matter on what data base you use. | 20:51 |
wdickers | well if that's all I really must be going. See you all next week (except you jelkner, see you on Monday) | 20:51 |
*** wdickers has quit IRC | 20:51 | |
jelkner | tiredbones: so how would we normalize this data? | 20:52 |
flint | well I will call and complain to elkner later. thanks to all. | 20:52 |
pcardune | for the ignorant masses: http://databases.about.com/od/specificproducts/a/normalization.htm | 20:52 |
jelkner | cya all next week | 20:52 |
pcardune | bye everybody (i'll stick around for a while) | 20:53 |
tiredbones | jelkner, the value you get it data quality. | 20:53 |
*** lhuynh has quit IRC | 20:54 | |
pcardune | tiredbones: normalization isn't something you have to worry about in interfaces | 20:55 |
pcardune | if it is ever a thing to consider it would be in the actual implementations | 20:55 |
tiredbones | pcardune, I'm not so sure of that. | 20:56 |
pcardune | can you give me an example? | 20:56 |
pcardune | or tell me what data is being copied? | 20:56 |
tiredbones | pcardune, refactoring is nice, but it can be to much time in the devloping of a product. | 20:57 |
pcardune | when you refactor zope code, you rarely change interfaces | 20:57 |
tiredbones | pcardune, is ever worlog going to have the name of the prodject recorded? | 20:57 |
pcardune | no | 20:58 |
carljm | seems to me that normalization sort of applies to building interfaces, in the sense that you don't want duplicate attributes, and you want all your attributes to be inherent properties of the object (i.e. dependent on the primary key) | 20:58 |
tiredbones | correct | 20:58 |
pcardune | carljm: that's right, that is what i was thinking to after breifly reading up on normalization | 20:58 |
pcardune | tiredbones: in our current model, there is only one project | 20:58 |
tiredbones | pcardune, but the is not realistic. | 20:59 |
pcardune | if there were more than one project, then the worklogs wouldn't store the project names | 20:59 |
pcardune | they would store references to the project object | 20:59 |
pcardune | in the same way work logs are connected to Persons | 21:00 |
carljm | just brushing up on normalization - in fact the point you (pcardune) made earlier about why we don't store a totalTime is precisely 3rd normal form in action... | 21:00 |
tiredbones | carljn, correct | 21:00 |
pcardune | (i've just been normalizing all along intuitively :D ) | 21:00 |
pcardune | a work log doesn't store the name of a person, it stores a reference to a person object | 21:01 |
tiredbones | Of course not. | 21:01 |
pcardune | which is just like a key in a relational database | 21:02 |
carljm | so, do you have time to give a fuller explanation of why we store the Person as an attribute of the WorkLog, instead of just making Person a WorklogContainer? | 21:02 |
tiredbones | pcardune, the opposite is true. A person relate to a worklog. | 21:02 |
carljm | the person also needs a reference to their worklog(s), it goes both ways | 21:03 |
tiredbones | pcardune, and a worklog relate to a prodject. | 21:03 |
tiredbones | dams/prodject/project/ | 21:04 |
tiredbones | time is derived from worklog. | 21:04 |
*** jelkner has quit IRC | 21:04 | |
pcardune | carljm: that's right | 21:05 |
tiredbones | The whole purpose of worklog is time. | 21:05 |
tiredbones | carljm,think of your statement as a foriegen key | 21:07 |
tiredbones | s/foriegen/foreigen/ | 21:07 |
carljm | tiredbones: it depends if the relationship is many-to-many, one-to-many, or one-to-one | 21:08 |
tiredbones | carljm,no it doesn't | 21:08 |
carljm | in a relational DB, to implement many-to-many you have to have a join table | 21:08 |
tiredbones | ok | 21:09 |
*** _pcardune has joined #schooltool | 21:09 | |
carljm | with objects, you just have references going both ways | 21:09 |
_pcardune | i'm on the phone with jelkner, but i'll be back and give you an explanation | 21:09 |
carljm | pcardune, thanks | 21:09 |
carljm | tiredbones: you're right that to have references go both ways in a one-to-many or one-to-one is duplication of information | 21:10 |
tiredbones | carljm, yes but a person to prodjects is a 1 - m. | 21:10 |
tiredbones | carljm, the time is a m - m | 21:10 |
tiredbones | carljm, time is based on a project and a project can have many people on it. | 21:12 |
carljm | tiredbones, so you want a worklog entry to be independently related to person and project | 21:15 |
tiredbones | carljm, yes | 21:16 |
tiredbones | carljm, the volitility of the info dictates that. | 21:17 |
carljm | tiredbones, well, i think you're right, but it's beyond the scope of the user story we've been given | 21:17 |
carljm | tiredbones, in fact, our current user story has no concept of project at all, just a single per-person worklog | 21:17 |
tiredbones | carljm, yes but the design is goin to suffer. | 21:17 |
tiredbones | carljm, by the way, normalization would have brought that out. | 21:18 |
carljm | tiredbones, i wouldn't say the design suffers. It depends what the problem is that's being solved. You're solving a different problem than the one posed in our use stories. | 21:18 |
carljm | if the goal is to have one worklog per person, and no concept of project, then you need a design that reflects that, not an unnecessarily-complicated design | 21:19 |
tiredbones | carljm, the user story is base on faults permis. | 21:19 |
tiredbones | carljm, the user story is base on faults permises. | 21:19 |
tiredbones | carljm, the design is not compilated. | 21:20 |
carljm | tiredbones: what premise is false? if the user wants to have one timelog per person, there's nothing inherently wrong with that. | 21:21 |
carljm | like i said, you're just solving a different problem. | 21:21 |
*** pcardune has quit IRC | 21:21 | |
tiredbones | carljm, the basic enitites are not looked at. Person Project Time. | 21:21 |
carljm | tiredbones, those are the basic entities for a _different problem_ | 21:22 |
carljm | the basic entities for _this problem_ are Person, Time | 21:22 |
carljm | projects do not exist | 21:22 |
tiredbones | ok | 21:22 |
tiredbones | carljm, Where do you go to school at? | 21:23 |
carljm | tiredbones, i agree with you that if we extend the use story to include multiple timelogs, then it should be done the way you suggest, not with multiple timelogs directly associated with a person | 21:23 |
carljm | tiredbones, i don't go to school anymoe | 21:23 |
carljm | s/anymoe/anymore | 21:23 |
carljm | when I did, I went to Goshen College (northern Indiana) | 21:24 |
tiredbones | carljm, You work for a living? | 21:24 |
carljm | tiredbones, yep, crazy thing, eh? | 21:24 |
tiredbones | carljm, Areyou going to be using zope in your day job? | 21:24 |
carljm | tiredbones, sort of | 21:25 |
carljm | tiredbones, i work for a community development agency | 21:26 |
carljm | tiredbones, my day job consists of volunteering my time at a number of community nonprofits | 21:26 |
carljm | tiredbones, at one of them, they wanted a web calendar solution | 21:26 |
carljm | i chose SchoolBell | 21:26 |
carljm | it had bugs, I fixed a few of the more glaring ones that were affecting them | 21:26 |
carljm | doing that got me interested in Zope | 21:26 |
carljm | and here I am | 21:26 |
carljm | tiredbones, how about you, where do you live/study? | 21:27 |
tiredbones | carljm, I'm retired some what, I'm a dad mom and homeschool my kids and build commercial building for myself. I have about forty year in computers, mostly with big iron.. I live in Maine. | 21:29 |
tiredbones | carljm, I'm going to go back into the field, thus the reason for my interest with schooltool. | 21:31 |
tiredbones | carljm, Think haven't change all that much only the terms. | 21:32 |
tiredbones | s/Think/things/ | 21:33 |
carljm | tiredbones, very neat - so what environment were you working in forty years ago in computers? | 21:33 |
carljm | tiredbones, and congrats on homeschooling the kids, that's a big job, i plan to do the same | 21:34 |
tiredbones | carljm, IBM and a product called CICS. | 21:34 |
tiredbones | carljm, Homeschooling gave more meaning to my life than anything. It should me mandatory for parents. | 21:36 |
carljm | tiredbones, an ironic conversation to be having here in #schooltool - a product dedicated to serving the needs of institutional schooling | 21:39 |
tiredbones | That why I'm doing it. | 21:39 |
carljm | what do you mean? | 21:40 |
tiredbones | I don't think is needs to be institutional. | 21:40 |
tiredbones | If we can ever pull education away from the unions, then maybe we can educate our childern. | 21:41 |
tiredbones | that is another use case. | 21:42 |
tiredbones | Back to the days of Plato. | 21:43 |
*** pcardune_ has joined #schooltool | 21:43 | |
tiredbones | pcardune, when you sign on as _pcardune is that because your machine time out? | 21:44 |
tiredbones | and then switches you to pcardune. | 21:45 |
pcardune_ | yeah | 21:45 |
*** pcardune_ is now known as pcardune | 21:45 | |
pcardune | ok, I just got off the phone with elkner | 21:46 |
tiredbones | cool | 21:46 |
carljm | tiredbones: i agree about education - though I don't know that i'd frame it as anti-union, but that's another discussion... | 21:47 |
tiredbones | true. | 21:47 |
tiredbones | I use to be on the school board. | 21:47 |
pcardune | I am pro homeschooling | 21:48 |
pcardune | at least for certain subjects | 21:48 |
pcardune | anyways, to get back to your question | 21:48 |
tiredbones | my son does the hons lab work at school and everthing else at home. | 21:49 |
pcardune | not having IPerson contain IWorkLog is ultimately just a design decision and you actually could implement it that way and have everything work just fine | 21:49 |
pcardune | it really all goes back to the nature of the components we are making | 21:50 |
tiredbones | pcardune, would it be hard to pull apart? | 21:50 |
carljm | pcardune: summary of the pros/cons of the design decision? | 21:51 |
pcardune | you mean like when we refactor? no, it wouldn't be that hard | 21:51 |
carljm | pcardune: what about the "nature of the components" suggests a certain direction? | 21:51 |
tiredbones | pcardune, because of the nature and importance of interfaces and the fact that the schema determines the data structure for future groeth. | 21:52 |
pcardune | well, Person's don't inherently have work logs | 21:52 |
pcardune | you want to connect things to the real world as much as possible | 21:52 |
tiredbones | pcardune, refactoring does not take in the data quality. | 21:53 |
pcardune | when a person does actually have work logs, it is more out of happenstance | 21:53 |
carljm | ok | 21:53 |
pcardune | as far as pros vs. cons | 21:53 |
carljm | just out of curiosity, if Person was a third-party interface that we can't touch, could we still make it a container for worklogs if we wanted to go that route? and if so, how would we do it? | 21:53 |
pcardune | yes you could | 21:54 |
pcardune | and this is in fact the proper way to do it | 21:54 |
pcardune | since worklogs aren't instrinsic to a Person object, making Person a container for work logs is no good, so we want to keep the objects distinct | 21:55 |
pcardune | what you would do is create an IWorkLogContainer interface | 21:55 |
flint | pcardune, well, I am having fun, carl you stay with this for me eh? | 21:55 |
pcardune | and set up constraints for having IWorkLogContainer contain IWorkLog | 21:55 |
*** _pcardune has quit IRC | 21:55 | |
pcardune | then in configure.zcml | 21:55 |
*** flint has quit IRC | 21:56 | |
pcardune | you can add | 21:56 |
pcardune | <content class="timeclock.person.Person"> | 21:56 |
pcardune | <implements interface="timeclock.interfaces.IWorkLogContainer /> | 21:57 |
pcardune | </content> | 21:57 |
pcardune | for example, if we wanted to attach this to schooltool | 21:57 |
pcardune | and we had the timeclock package and the schooltool package in the path then we could say: | 21:57 |
pcardune | <content class="schooltool.person.Person"> <implements interface="timeclock.interfaces.IWorkLogContainer" /> </content> | 21:58 |
pcardune | and that would go in timeclock/configure.zcml | 21:58 |
pcardune | so we wouldn't touch anything in schooltool, but now our schooltool person would be able to container IWorkLog instances | 21:58 |
carljm | right | 21:59 |
pcardune | this is the real flexibility with zope | 21:59 |
carljm | have to get used to this business of hooking things up with zcml - my instinct is still to inherit and extend | 21:59 |
pcardune | if you use zcml then it is *super* flexible | 21:59 |
tiredbones | I think of conponent arch as putting together a train. | 22:00 |
pcardune | I would agree with you tiredbones but trains are too linear :) zope3 is anything but linear | 22:01 |
tiredbones | yea, I know. | 22:01 |
pcardune | in any case, carljm if we put a constraint in IPerson saying it can contain IWorkLog, then we have reduced the flexibility of the api | 22:02 |
pcardune | that's the main reason we don't do that | 22:03 |
tiredbones | My concerns with interfaces, as they relate to schemas, is changing data needed. | 22:03 |
carljm | sure | 22:04 |
pcardune | that is a valid concern | 22:04 |
pcardune | which is why it is important to design your interfaces as best you can the first time | 22:04 |
tiredbones | because once you build your schema, then you what to make sure your contract is always with all its attributes. | 22:05 |
tiredbones | Waht did I say | 22:05 |
pcardune | i'm not sure, i got confused at "then you what to make" | 22:05 |
pcardune | oh wait, maybe what=want | 22:06 |
tiredbones | Basically, you alway want to service your contract 100% of the time. | 22:06 |
tiredbones | If data changes then it makes it hard to change your schema. | 22:07 |
pcardune | right, so if you want to add attributes to a schema, you should extend it with subclasses | 22:07 |
tiredbones | Yea, but now where getting make to inheritence messes. | 22:08 |
tiredbones | s/make/back/ | 22:08 |
pcardune | just wait until we do stuff with adapters | 22:09 |
pcardune | or adaptors | 22:09 |
tiredbones | like I said, normalize normalize normalize! to avoid this issue. | 22:10 |
pcardune | I suppose you're right, although instead of calling it normalize, we call it, "understanding the problem domain" | 22:11 |
tiredbones | like I said earlier, only the term have change. | 22:11 |
pcardune | in the real world when you want to make a change to the api and you already have a bunch of users who don't want to reenter all their data with the new api, zope has a generations package that allows you to do that automatically and make it transparent | 22:12 |
tiredbones | Let your data do the talking! | 22:12 |
pcardune | I've got to go have some lunch | 22:13 |
pcardune | see you all later. | 22:13 |
tiredbones | thanks for the talk. | 22:13 |
pcardune | thanks for keeping me on my toes :) | 22:13 |
carljm | thanks pcardune | 22:16 |
carljm | later | 22:16 |
carljm | i've got to go also, good talking with you tiredbones | 22:16 |
tiredbones | bye | 22:16 |
*** carljm has quit IRC | 22:16 | |
*** ffsnoopy has joined #schooltool | 22:41 | |
ffsnoopy | pcardune: are you available paul? | 22:41 |
tiredbones | ffsnoopy, he's gone to lunch. | 22:42 |
ffsnoopy | okay, thanks :) | 22:42 |
*** ffsnoopy has left #schooltool | 22:47 | |
*** pcardune has quit IRC | 23:03 | |
*** pcardune has joined #schooltool | 23:17 | |
*** th1a has quit IRC | 23:17 | |
tiredbones | pcardune, can I ask a qustion about python search path? | 23:19 |
pcardune | sure | 23:19 |
tiredbones | if I create an instance and start that instance up and I created the slug in the instance etc/package-include shouldn't I see somthing in content screen? | 23:21 |
tiredbones | relating to the package | 23:21 |
pcardune | not necessarily | 23:22 |
tiredbones | when wouldn't I | 23:22 |
*** ignas has quit IRC | 23:23 | |
pcardune | you would only see something in contents if you had registered an AddMenuItem for something in the package | 23:23 |
* tiredbones got to look at worldcookery and messageboard. | 23:24 | |
tiredbones | pcardune, I should beable to import the modules from python prompt? | 23:25 |
pcardune | assuming they are in the path yes | 23:26 |
tiredbones | how should this be coded in python prompt? from worldcookery import recipe??? | 23:27 |
tiredbones | how much of the pathe has to be given? | 23:28 |
pcardune | as much as is needed | 23:28 |
pcardune | if you are in the zope3/lib/python directory | 23:28 |
tiredbones | yes | 23:29 |
pcardune | and worldcookery is in that directory too | 23:29 |
tiredbones | yes | 23:29 |
tiredbones | I tired many | 23:29 |
pcardune | then in a python prompt, the path to stuff inside worldcookery is import worldcookery.path.to.stuff.in.worldcookery | 23:29 |
tiredbones | so it should be import worldcookery import recipe if you go accorden to the book. | 23:30 |
pcardune | i don't remember what's in the book exactly. is there a recipe.py file in the worldcookery folder? | 23:31 |
tiredbones | yes | 23:31 |
tiredbones | the implementor | 23:31 |
tiredbones | I also change PYTHONPATH to every possible combination one can thonk off. | 23:32 |
tiredbones | think of | 23:33 |
pcardune | well, the current directory is always in the python path | 23:33 |
tiredbones | I have no problen importing zope | 23:35 |
pcardune | im not sure why you are having that problem then | 23:36 |
tiredbones | ok thanks | 23:37 |
*** tiredbones has left #schooltool | 23:42 | |
*** vmx_ has joined #schooltool | 23:53 | |
*** vmx_ is now known as vmx | 23:53 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!