IRC log of #schooltool for Saturday, 2009-02-21

*** alga has joined #SchoolTool00:04
*** replaceafill has quit IRC01:31
*** jstraw has joined #schooltool01:48
*** jstraw1 has joined #schooltool03:03
*** jstraw has quit IRC03:03
*** jstraw1 has quit IRC03:04
*** jstraw has joined #schooltool03:04
*** jstraw has quit IRC03:08
*** jstraw has joined #schooltool03:18
*** jstraw1 has joined #schooltool03:47
*** jstraw has quit IRC03:47
*** alga has quit IRC03:59
*** jstraw1 has quit IRC04:11
*** fsufitch has joined #schooltool04:26
*** aelkner has quit IRC04:34
*** aelkner has joined #schooltool04:37
*** jstraw has joined #schooltool04:51
*** ignas has joined #schooltool12:07
*** alga has joined #SchoolTool13:21
*** fsufitch has quit IRC14:15
aelknerignas: ayt?17:51
ignasyeah17:51
aelknerso i was thinking about your objection to having different types of containers in a container17:51
aelknerlike i did with app['schooltool.interventions'][2008-2009']['messages'] vrs ['goals'], etc.17:52
aelknerand what i was suggesting in my note with ...['templates'] and ['deployed'] and ['evaluations']17:53
aelknerbut consider this17:53
aelknerthe app root itself is a container that contains diefferent types of containers17:53
aelknerlike persons, schoolyears, etc17:54
aelknerso i'm not getting the harm in that17:54
aelknerwouldn't you say it's inconsistent to worry about it in one place and not another?17:56
aelkneranother thing17:57
ignasthere is a reason why we did that with app17:57
ignasand it was done 3 years ago17:57
aelkneryes?17:58
ignasback then the idea was - "we want to make it extensible, so let's make app a container"17:58
aelknerright17:58
ignasso other people could add their own "stuff" in there17:58
ignasalso - we did not have pluggable traversers17:58
ignasso making traversal into an attribute possible would have required editing SchoolToolApplication code17:59
ignasor so we thought17:59
ignasalso - i think this idea came to be before we used full Zope3 even17:59
ignasand also that is one of the reasons why I prefer ISchoolYearContainer(app) over app['schooltool.schoolyear']18:00
ignasbecause you have some sort of contract18:00
ignassaying - give me this thing18:00
ignasinstead of "give me anything that's there"18:00
aelknerso you're saying that if you could do it from scratch, app wouldn't be a container18:01
ignasit probably would be, because it is a root object, and you can't have multiple roots in a straightforward way18:02
ignaswhile in your case anyone without access to gradebook code but still wanting to add some stuff - can just add app['ignas.gradebook']18:02
aelkneryeah, the container makes extending it and easy thing to do18:03
ignasbut while it's neccessary for application to have different "modules", i don't think gradebook needs "modules" inside of it18:05
aelknerwell, if we already had app['schooltool.gradebook'].activities, where we kept the activities18:05
aelknerinstead of as annotations as they are now18:05
aelknerand we already had app['schooltool.gradebook'].evaluations where we had the evaluations18:06
aelknernow i'm coming along and, as you suggest, i would add .templates and .deployed18:06
ignasyou are not coming along18:06
ignasyou are changing the gradebook itself18:06
ignasschoooltool.gradebook18:07
aelknerbut what i'm saying is i'm adding attributes to that object18:07
ignasyeah18:07
aelknerremember how you said by putting initialization of class attribute in BasicPerson18:08
ignasnot in this case18:08
ignasyou can do that with strings18:08
ignasand with None18:08
ignasif you want an instance of a persistent object there18:08
ignasyou do evolution18:08
aelknerso you see how much of a pain it is to update the code18:09
aelkneryou need to evolve in order to do it18:09
ignasit'd be a 3-4 line script anyway18:09
ignasand if you have a container18:09
ignasyou'd either have to use "write on read"18:09
ignaswhich is not a very nice thing to do and also adds 3-4 lines of code18:09
ignasor - an evolution script18:09
ignasand even then - you can do write on read with attributes too (probably should not)18:10
ignashow else do you think of populating app['schooltool.gradebook']['templates'] with a template container?18:11
aelknerlike i did with the intervention system, write on read18:12
aelkneryou see i like write on read18:12
aelknerbecause the code can handle any state of the db18:12
aelknerwhereas evolution scripts force us to think about the state of the db at any given time18:12
ignasany?18:12
aelknerthat will become more and more complicated as the app grows18:13
ignasany?18:13
ignasnot really18:13
ignasonly the state that is now matters18:13
ignasthat's their beauty18:13
ignasi mean - you get all the app things, and do app['schooltool.gradebook'].templates = TemplateContainer()18:13
ignasand that's it18:14
aelkneryou're talking about what the evolution script would do, right?18:14
ignasyeah18:14
aelknerheck, the first evolution script i need to write would need to create app['schooltool.gradebook'] in the first place18:16
ignasahhh18:16
ignasso there are no schooltool.gradebook's at the moment?18:16
ignasor "there might not be any?"18:16
aelknereverything is in annotations18:16
ignasif there are not any of them18:16
ignasthen you just create the attributes18:17
ignasin the constructor of the Gradebook object18:17
ignasand create that object using write on read18:17
ignasin app['schooltool.gradebook']18:18
ignasno evolution neccessary18:18
aelknerso let me restate what i think you're saying18:18
aelknerfor now I make ISchooltoolGradebook(app) be a write on read adapter18:19
aelknerand the constructor for SchooltoolGradebook, the object, would create the attributes templates, deployed, evalutations, etc.18:19
ignasyeah18:20
aelknerand not evolution is necessary18:20
ignasyes18:20
ignasbecause there is no object to evolve18:20
aelknerif in the future we need to add another attribute to SchooltoolGradebok18:20
ignasthere was no object in there before18:20
aelknerwe would need evolution at that time18:20
ignasyes18:20
ignasbut you'd need it anyway, unless you'd add one more level of indirection18:20
ignasthat could do write on read18:21
ignaslike IGradebookTemplates(ISchoolToolGradebook(app))18:21
aelknerwell, that's what i'm getting at18:21
ignasor IGradebookTemplates(app)18:21
aelknerif write on read is an exceptable strategy18:21
ignasacceptable?18:21
ignasin the case of a top level container - i think yes18:22
ignasbecause gradebook is a plugin18:22
ignasso - you can get from "no gradebook" to "with gradebook" without zope running any evolution scripts at all18:22
ignasso you both - don't do evolution, and also - don't have to do AppInit stuff18:22
aelknerthat's what i love about it18:23
ignaswhich is a good tradeoff in this case - you do write on read, you get it be a plugin18:23
ignasbut you see - dealing with options of "there is gradebook" and "there is no gradebook" when thinking about the db is easier18:23
ignasthan thinking about "there is gradebook that has templates and evaluations" vs "there is gradebook that has activities"18:24
aelknereasier than?18:24
aelknerhow so?18:24
ignasbecause there are 2 possible choices18:24
ignasvs 16 (with 4 containers that might be there)18:24
aelkner2 vrs 16, they are both more than one18:25
aelkneronce an idea works for 1 and n+1, it works for all18:26
aelkneras in mathematical induction18:26
aelkneri'm telling you, i love write on read18:26
ignas:D18:27
aelknerand i don't know why we could apply it as a rule rather than only in some places18:27
aelknerit's either a mistake to do it at all18:28
aelkneror it's a good idea18:28
aelknerso why not do it everywhere18:28
ignaswhen all you have is a hammer, every problem looks like a nail18:28
ignasit's a fallacy, some tools are good in some places and are not good in other places18:28
aelkneryou could put it another way18:30
aelknerif a hammer for all problems18:30
aelknerthen you're tool belt doesn't need to be as heavy18:30
algaaelkner: are you saying that maintaining 16 cars in a family is as hard as maintaining 2? :)18:30
aelkneractually i'm saying if you have mechanic in the family18:31
aelknerthen maintaining 16 cars is not any harder than 2 :)18:31
ignasmy head can only fit 7 variables in it at once, once it goes past 7 - all bets are off, and i will forget something18:32
aelknerfor me it's more like 3 varaibles18:32
aelknerbut it's not like one needs to keep it in one's head18:32
aelknerthe code takes care of ot18:32
aelknerit18:32
ignasyes, I need when writing evolution scripts18:32
aelknerah, i see18:33
ignasbecause I can't entrust that to adapters, i must know what parts of the system can be there and what - can not be there, and handle each such place18:33
ignasso later I will have a gradebook object, and well - have no idea what's in it, because maybe someone looked at activity list and activity container got created, maybe not18:34
ignasmaybe some one just added a template, and so initialized templates and deployed, but maybe not18:34
ignasI can handle "is there a gradebook - if yes - evolve it"18:35
ignaskind of easily, but doing gradebook['templates'].updateTemplates()18:35
ignasreleasing18:35
ignasand then saying Oops, we just broke 3 installations, because I forgot that templates can be uninitialized18:35
ignasjust unittesting the code that has to handle it technically requires you to recreate all possible states of the object18:36
ignasit's easier when you don't have to find all the possible states by grepping for write on read adapters ;)18:37
aelknerit's a good point18:37
aelkneryou always win when you start talking complexity of evolution scripts :)18:37
jstrawround 2! fight?! :)18:42
ignasjstraw: how is polishing startup scripts and packaging them into debian packages going?18:43
jstrawuh not far...18:43
jstrawI had a mess on my hands last week18:43
jstrawMoodle upgrade for the loss18:43
* ignas kidding ;) it's like beating up the announcer during a box match ;)18:43
jstrawthat said... it is on my list of things to do18:44
jstraw*unrolls a scroll with 30 feet of things to do*18:44
ignas:)18:45
aelknerignas: given that I eventually want to move the existing annotations of section and person to app['schooltool.gradebook']18:52
aelknercould it be a good strategy for me to write that evolution script first18:52
aelknerand have it create app['schooltool.gradebook'] there18:53
aelknerthen i wouldn't even need write on read18:53
aelknerand i'd only have the one evolution script to write18:53
aelkneronce again trying to use less tools rather than more18:53
ignashmm, does schooltool.gradebook have it's own evolution scripts?18:58
aelknernot yet, but i cold add it18:58
ignasyou do know that you must first deploy the "0" evolution script18:58
ignasand you can only continue evolving after that18:59
ignasso if you will simply add 1 evolution script for schooltool.gradebook18:59
ignasit will not get run18:59
ignasa nasty feature18:59
ignasbut the logic is that - evolution scripts don't know whether "you have not run script 1" vs "you have installed the plugin/app for the first time"19:00
ignasyou can work around this by writing an "installable" evolution script, but that is also tricky19:01
* ignas still hasn't got the full schooltool plugin evolution workflow properly ready19:01
ignasnot sure if i can make something up for this release19:02
ignasok, going home19:09
ignasbye19:09
*** ignas has quit IRC19:09
*** alga has quit IRC19:30

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!