From ajs@ix.netcom.com Wed Aug 1 01:38:29 2001 From: ajs@ix.netcom.com (Arthur Siegel) Date: Tue, 31 Jul 2001 20:38:29 -0400 Subject: [Edu-sig] Re: Changing the Division Operator -- PEP 238, rev 1.12 References: Message-ID: <000701c11a22$4e890f60$a9e1fea9@carol> Bruce writes - > I think you are missing something... > If you were designing a control system for the `toys', and needed to > expose a user level programming interface; would you be more likely to > choose languages C+S or language P (which can do both jobs) > [C+S == P, of course]. > > Unless CP4E is done as a "semantic game" with a larger language, > language P will never exist. Or else I am expressing myself badly and you are missing something of my point. Let's take one little such toy. A calculator. One that does undisguised Python numerics - 3/4 = 0, 3.0/4 = .75. But let's give them 2 different names. One is called the Python Calculator and the other the Python Numeric Type Calculator. One is sadly broken and the other works perfectly - but they are exactly the same little toy. If you see my wonderfully made little point. ART From pdx4d@teleport.com Wed Aug 1 04:15:38 2001 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 31 Jul 2001 20:15:38 -0700 Subject: [Edu-sig] Re: Changing the Division Operator -- PEP 238, rev 1.12 In-Reply-To: <000701c11a22$4e890f60$a9e1fea9@carol> References: Message-ID: <4.2.0.58.20010731201318.00d10ad0@pop3.norton.antivirus> >But let's give them 2 different names. One is called the Python >Calculator and the other the Python Numeric Type Calculator. > >One is sadly broken and the other works perfectly - but they are >exactly the same little toy. > >If you see my wonderfully made little point. > >ART But then, programming with variables, the type of which may not be readily known to the reader, is not the same thing as raw entry of numbers into a calculator. Just looking at raw numbers is to all together miss the point of adding a // key to this calculator (and saving / from doing double-duty depending on the type of inputs we feed it). Kirby From pdx4d@teleport.com Wed Aug 1 07:57:01 2001 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 31 Jul 2001 23:57:01 -0700 Subject: [Edu-sig] Advanced or beginner? In-Reply-To: <000301c11849$d315e030$8101a8c0@RABBIT> References: Message-ID: <4.2.0.58.20010731235120.00bf75f0@pop3.norton.antivirus> When teaching Python, do we begin with a treatment of low level representations of data? Or is that saved for a later time? For example: >>> import struct,array,sys >>> sys.byteorder 'little' >>> m = array.array('I','THIS') >>> m array('I', [1397311572L]) >>> k = [hex(ord(i))[2:] for i in 'THIS'] >>> k.reverse() >>> k ['53', '49', '48', '54'] >>> k = "".join(k) >>> k '53494854' >>> eval('0x'+k) 1397311572 >>> struct.pack('i',1397311572) 'THIS' Basically, I'm taking the string 'THIS' and converting it to an integer. The way this is done internally corresponds to concatenating 4 hex bytes in reverse order, i.e. 'T' = 0x54: >>> ord('T') 84 >>> hex(84) '0x54' Link those bytes to return a bigger number in decimal form (1397311572). Then tell struct it's reading an integer, which it returns as a corresponding string: lo and behold, our THIS is returned to us. Kirby From pdx4d@teleport.com Wed Aug 1 08:14:14 2001 From: pdx4d@teleport.com (Kirby Urner) Date: Wed, 01 Aug 2001 00:14:14 -0700 Subject: [Edu-sig] Re: Changing the Division Operator -- PEP 238, rev 1.12 In-Reply-To: <4.2.0.58.20010731201318.00d10ad0@pop3.norton.antivirus> References: <000701c11a22$4e890f60$a9e1fea9@carol> Message-ID: <4.2.0.58.20010731235811.00bf87a0@pop3.norton.antivirus> Note, same answers except for type: 2 + 2 = 4 2.0 + 2.0 = 4.0 2L + 2L = 4L 2 * 2 = 4 2.0 * 2.0 = 4.0 2L * 2L = 4L 2**2L = 4L 2.0**2L = 4.0 2.0**2 = 4.0 etc. >>> 4L == 4 == 4.0 # check for equality 1 2 - 1 = 1 2.0 - 1.0 = 1.0 2L - 1L = 1L >>> 1L == 1 == 1.0 # check for equality 1 But... 1L/2L = 0L 1/2 = 0 1.0/2.0 = 0.5 ... division is special. The other primitive ops return essentially the same answer (as demonstrated by ==), regardless of type. But not /. / is different. Does it have to be? 1L/2L = 0.5 1/2 = 0.5 1.0/2.0 = 0.5 But what if we want the divmod(a,b)[0] integer behavior? 1L//2L = 0L 1//2 = 0 1.0//2.0 = 0 Now, if we see var3 = var1/var2 in code, we know var3 is a float. We know this even if we don't know for sure what var1 and var2 are. This isn't so important with + - * and ** because the float and non-float answers are essentially the same (baring overflow when long oes beyond the range of int or float), but with /, the answers are currently very different depending on argument types. Such gross differences in behavior would be better handled by two different operators, such that code readibility is not sacrificed to a primitive operator's low-level, tricky polymorphism (you can still redefine / if you want to, using __div__ and __rdiv__ -- you'll also be able to override // -- then it's up to you to make clear to your readers what you're up to). Kirby From pdx4d@teleport.com Wed Aug 1 16:09:21 2001 From: pdx4d@teleport.com (Kirby Urner) Date: Wed, 01 Aug 2001 08:09:21 -0700 Subject: [Edu-sig] More re: Advanced or beginner? In-Reply-To: <4.2.0.58.20010731235120.00bf75f0@pop3.norton.antivirus> References: <000301c11849$d315e030$8101a8c0@RABBIT> Message-ID: <4.2.0.58.20010801075324.00d0f3d0@pop3.norton.antivirus> Another way to look at the relationship between bytes, integers, characters: >>> [hex(i) for i in array.array('b',"THIS")] ['0x54', '0x48', '0x49', '0x53'] >>> binascii.hexlify("THIS") '54484953' >>> eval("0x"+binascii.hexlify("THIS")) 1414023507 >>> struct.pack('i',1414023507) 'SIHT' hexlify strings together hex bytes. Four bytes will be in reverse order from the 'i' type, such that packing the resulting decimal will result in a four-byte string in reverse order. 'h' works on byte pairs: >>> binascii.hexlify("MY") '4d59' >>> [hex(i) for i in array.array('b',"MY")] ['0x4d', '0x59'] >>> eval("0x"+binascii.hexlify("MY")) 19801 >>> struct.pack('h',19801) 'YM' You may also be able to go "double-wide" with 8-byte mappings of characters to double long floats (type d): >>> array.array('d',"ABCDEFHI") array('d', [1.0826786300000142e+045]) >>> struct.pack('d',1.0826786300000142e+045) 'ABCDEFHI' Question: Why does float -> long work like this: >>> long(1.0826786300000142e+045) 1082678630000014218353234260713996413124476928L and not like this? >>> long(1.0826786300000142e+045) 1082678630000014200000000000000000000000000000L Kirby From tim.one@home.com Wed Aug 1 22:57:57 2001 From: tim.one@home.com (Tim Peters) Date: Wed, 1 Aug 2001 17:57:57 -0400 Subject: [Edu-sig] More re: Advanced or beginner? In-Reply-To: <4.2.0.58.20010801075324.00d0f3d0@pop3.norton.antivirus> Message-ID: [Kirby Urner] > ... > Question: > > Why does float -> long work like this: > > >>> long(1.0826786300000142e+045) > 1082678630000014218353234260713996413124476928L > > and not like this? > > >>> long(1.0826786300000142e+045) > 1082678630000014200000000000000000000000000000L > > Kirby Because your machine floating-point isn't decimal, it's binary: >>> x = 2.**100 >>> print x 1.26765060023e+030 >>> print long(x) 1267650600228229401496703205376 >>> print 2L ** 100 1267650600228229401496703205376 >>> So making long(2.**100) 1267650600230000000000000000000L instead would be plain wrong. The same thing happens in your example, but is harder to picture because, offhand, I bet you don't know the exact IEEE-754 bit pattern corresponding to 1.0826786300000142e+045 . >>> x = 1.0826786300000142e+045 >>> import math >>> mantissa, exponent = math.frexp(x) >>> print mantissa 0.758577950788 >>> print exponent 150 >>> print math.ldexp(mantissa, 53) 6.832662753e+015 >>> mantissa_as_long = long(math.ldexp(mantissa, 53)) >>> mantissa_as_long 6832662753002049L >>> print mantissa_as_long << (exponent-53) 1082678630000014218353234260713996413124476928 >>> print long(x) 1082678630000014218353234260713996413124476928 >>> IOW, long(some_huge_integer_in_float_format) *does* have a large number of trailing zeroes, but in base 2, not necessarily in base 10. >>> print hex(long(x)) 0x308C8A88868482000000000000000000000000L >>> From Arthur_Siegel@rsmi.com Thu Aug 2 22:27:37 2001 From: Arthur_Siegel@rsmi.com (Arthur_Siegel@rsmi.com) Date: Thu, 2 Aug 2001 16:27:37 -0500 Subject: [Edu-sig] Re: Changing the Division Operator -- PEP 238, rev 1.12 Message-ID: <008B09ED.N22121@rsmi.com> Kirby writes - >But then, programming with variables, the type of which may not >be readily known to the reader, is not the same thing as raw >entry of numbers into a calculator. Just looking at raw numbers >is to all together miss the point of adding a // key to this >calculator (and saving / from doing double-duty depending on >the type of inputs we feed it). I guess I do communicate poorly. My point was totally something else: What a end-user understands themselves to be working with determines their experience wth it. If they aren't clear that they are in an environment where something other than calculator numerics is at work, the fact that they are getting results inconsistent with normal calculator numerics seems broken. If their expectations are put properly in line with what they are going to experience, the experience is changed. By ultimate point is that I think that there has been an implicit assumption that lessons learned from environments like VPython in a college physics class are somehow relevent or meaningful when speaking of, let's say, a beginning programming class. I contend that they are not different shades of gray. They are just different, period. Design decisions that might well be good for one constituency, could be directly counter-productive as to the other. It would be better if things were simpler. Its not my fault that they may not be. I happen to have a deeper interest in one constituenecy than the other. So I have been struggling to get this simple distinction on some map. Very badly. ART From Arthur_Siegel@rsmi.com Thu Aug 2 23:16:14 2001 From: Arthur_Siegel@rsmi.com (Arthur_Siegel@rsmi.com) Date: Thu, 2 Aug 2001 17:16:14 -0500 Subject: [Edu-sig] More re: Advanced or beginner? Message-ID: <008B10C6.N22121@rsmi.com> Kirby asks - >When teaching Python, do we begin with a treatment of >low level representations of data? Or is that saved for >a later time? Good question. Truth of the matter is that I don't consider myself a beginner anymore, but I am lost even trying to follow your illustration. But I do have a top-level awareness of data structure issues, and that has been essential to understanding the environment. IMO top-side awareness is crucial. The details can follow. So your illustration to me would be more of a "for example watch what happens when" rather something that needed to be grasped in its full detail. ART From Brent.Burley@disney.com Fri Aug 3 20:12:03 2001 From: Brent.Burley@disney.com (Brent Burley) Date: Fri, 03 Aug 2001 12:12:03 -0700 Subject: [Edu-sig] long int / long int = ?? Message-ID: <3B6AF783.3FD2923E@fa.disney.com> It has been noted that int/int=int results in more information loss than int/int=float. Based on this, it has been proposed that anything/anything return float. This got me wondering about long ints. Given that a long int can have an unlimited number of digits (easily into the thousands), the result of a long/long could also be an unlimited number of digits (considering just the integer part). Given that a float can only represent about a dozen or so digits of precision, the precision loss due to float conversion could be much greater than the precision loss due to dropping the fractional part of the long division. It's as if you're compressing an unlimited amount of information into 8 bytes. Also consider that float can only represent numbers up to about 1e308. Any result > 308 digits would result in a float "inf" - total information loss. I therefore argue that long int division should not result in a float. There have been discussions about a unified numeric model for python. One suggestion is to automatically promote to long int on int overflow. If int/int=float and long/long=long, auto-promoting int to long could cause strange and unpredictable results. However, if a/b=float for all types, this would be unfortunate for the long/long case for the reasons mentioned. Are rationals the answer? They would provide zero information loss for integer division and consistent behavior between integers, rationals, and floats. So, if rationals are coming, is int/int=float just a stopgap? Is it worth the pain? Brent From ajs@ix.netcom.com Sat Aug 4 02:04:47 2001 From: ajs@ix.netcom.com (Arthur Siegel) Date: Fri, 3 Aug 2001 21:04:47 -0400 Subject: [Edu-sig] PythonScript Message-ID: <000701c11c81$757efce0$a9e1fea9@carol> What not a PythonScript variant? VPython is itself all C. Its purpose is to expose some functionality to Python scripting, but it is not Python itself. Wouldn't a relatively small sub-set of Python functions accommodate the needs of this kinds of project. And since it is geared for a specific constituency and use, things like case insensitivity, simplified numerics, etc. become "cost effective" - clearer benefits, less cost to others. A real light weight distro with limited library support, but a clear and simple C extension API. What am I missing. Undoubtedly something. ART From csmith@blakeschool.org Sun Aug 5 20:49:38 2001 From: csmith@blakeschool.org (Christopher Smith) Date: Sun, 05 Aug 2001 14:49:38 -0500 Subject: [Edu-sig] Working interactively with IDE (refreshing script; namespace updating) Message-ID: After reading the "Up All Night with IDLE" thread http://mail.python.org/pipermail/tutor/2001-January/003082.html and seeing the post by Patrick regarding "Refreshing a script" I came up with the following way to work with IDE: The problem: When you are working on a script in a window and you make changes to an object (variable, function, etc...) name, the old object still exists. This means that you will not always get an "is not defined" error even though you would if you quit and tried to run your script after restarting IDE. Example: ORIGINAL x=2 print "x=",x MODIFIED y=1 print "y=",x ## <--forgot to change the 2nd x # the modified program will print "y= 2" -- even # though the x variable is undefined in the script it is # still remembered by Python in this IDE window and # that is what you told it (inadvertently) to print. A solution: Work with two scripts, one to load your active work and one containing your developing script: # tester.py (this just loads and reloads your work) import mywork reload(mywork) mywork.testmywork() # mywork.py (this is the one that will contain your work def testmywork(): x=2 print "x=",x When you make changes to "mywork.py" and *save* these changes and then run the "tester.py" program as written, you work in "mywork" will be reloaded and if you have a modification like shown above, you will generate an error since x is not defined. When your scipt runs as you want it to, copy the text of "mywork.py", delete the first line, and unindent one level and save under a new name. The one-best-solution (IMO): IDE would automatically do this sort of thing with a script that is being run --not in the interactive window which prompts you with the ">>>" but in the script windows that are created and used to write new scripts. /c From jack@oratrix.nl Sun Aug 5 21:01:13 2001 From: jack@oratrix.nl (Jack Jansen) Date: Sun, 05 Aug 2001 22:01:13 +0200 Subject: [Edu-sig] Re: [Pythonmac-SIG] Working interactively with IDE (refreshing script; namespace updating) In-Reply-To: Message by "Christopher Smith" , Sun, 05 Aug 2001 14:49:38 -0500 , Message-ID: <20010805200118.C2FC3162E06@oratrix.oratrix.nl> I think I would categorise this as a bug in IDE, I think it should clear out the namespace of the module before running it again. Or at least there should be an option alongside the "run as __main__", "run profiled", etc. to get this behaviour. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From pdx4d@teleport.com Sun Aug 5 21:53:56 2001 From: pdx4d@teleport.com (Kirby Urner) Date: Sun, 05 Aug 2001 13:53:56 -0700 Subject: [Edu-sig] long int / long int = ?? In-Reply-To: <3B6AF783.3FD2923E@fa.disney.com> Message-ID: <4.2.0.58.20010805135203.00bf9870@pop3.norton.antivirus> At 12:12 PM 8/3/2001 -0700, Brent Burley wrote: >It has been noted that int/int=int results in more information loss than >int/int=float. Based on this, it has been proposed that >anything/anything return float. This got me wondering about long ints. I don't think the problem is with the information loss, but the fact that this leak of information might easily occur when not intended or expected. A rational numbers type might be appealing though, as part of the primitive language. Currently, lots of optional modules give you rationals (heck, I've written one myself), and/or even decimals of quasi-unlimited precision. Kirby From pdx4d@teleport.com Sun Aug 5 21:58:12 2001 From: pdx4d@teleport.com (Kirby Urner) Date: Sun, 05 Aug 2001 13:58:12 -0700 Subject: [Edu-sig] PythonScript In-Reply-To: <000701c11c81$757efce0$a9e1fea9@carol> Message-ID: <4.2.0.58.20010805135404.00c0c3b0@pop3.norton.antivirus> > >What am I missing. Probaby all you're missing in this instance are people with the energy and interest/motivation for implementing such a thing. Scheme has levels of use built in, i.e. you can pick 'beginner level','intermediate' etc. and be given graduated interfaces to the language. This is to help teachers give students a more structured learning environment. In the case of Python, modules have a little bit of the same function, in that you've only got the primitive built-in capabilities until you start loading stuff -- and that's still quite a lot to learn (e.g. you've still got all the list, dictionary and string methods -- or most of 'em). On the other hand, we wouldn't want to turn of case- sensitivity if the goal were to train future Python programmers I don't think. That'd just set them up to have to unlearn a lot of reflexes -- same with numerics it seems to me. But then, maybe you're not proposing this environment for would-be Pythonistas. Kirby >Undoubtedly something. > >ART > > > >_______________________________________________ >Edu-sig mailing list >Edu-sig@python.org >http://mail.python.org/mailman/listinfo/edu-sig From ajs@ix.netcom.com Mon Aug 6 03:42:09 2001 From: ajs@ix.netcom.com (Arthur Siegel) Date: Sun, 5 Aug 2001 22:42:09 -0400 Subject: [Edu-sig] re: PythonScript Message-ID: <000701c11e21$678e0800$a9e1fea9@carol> >On the other hand, we wouldn't want to turn of case- >sensitivity if the goal were to train future Python >programmers I don't think. That'd just set them up to >have to unlearn a lot of reflexes -- same with numerics >it seems to me. But then, maybe you're not proposing >this environment for would-be Pythonistas. No indeed I'm not. But I am trying to recognize the existence of the other constituency relevant to Edu-Sig - e.g., the physics class scripter of VPython or the geometry class scripter of PyGeo. And am arguing, I guess, that to the extent it is determined that this constituency may have unique requirements, that efforts to accommodate them be set aside as a special project, not an issue of central concern to the mainstream development of Python. I, BTW, do not necessarily agree that those needs are unique. VPython is not only visual Python, it is visual Numeric - which relies on typing of arrays, with all kinds of traps for the uninitiated, unaware, or the uncareful. Typical was the Zero Division "bug report" on the main list. Some variant of: a=array([1,2,3]) snip,snip,snip a[0]=.4 1/a[0] = BOOM/CRASH But I just set a[0] explicitly to .4 and Python is treating it as zero, therefore bug report. The VPython class members who *only* got trapped by 3/4 were probably not doing their homework. ART From jbabb@mediaone.net Mon Aug 6 18:38:35 2001 From: jbabb@mediaone.net (Jeffry Babb) Date: Mon, 6 Aug 2001 13:38:35 -0400 Subject: [Edu-sig] general newbie guidance Message-ID: Hello All, I teach C++ and Java at a University here in Virginia, but will have the opportunity and pleasure to teach an "intro to programming" year-long course to high school students this comming academic year. I have pored over the materials at Python.org and am not asking a "dumb" question in terms of "what do I do?" but rather, I am asking if anyone on the list has some general guidance and pointers. Specifically, I have been given the freedom to select the curriculum and wish to use Python during the course. Any gems of wisdom, pointers, or "gotchas" that you can provide are greatly appreciated. I have read the "white-papers" on CP4E and very much agree with the perspective, which is why I want to introduce a web-aware, modern, object-oriented "scritping" language to the students as I see that to be the future of programming languages (although a good C/C++ foundation NEVER hurts either). I hope this provides the opportunity for fresh air from the division debates. Thank you, Jeffry Babb Richmond, Virginia From pdx4d@teleport.com Mon Aug 6 20:44:27 2001 From: pdx4d@teleport.com (Kirby Urner) Date: Mon, 06 Aug 2001 12:44:27 -0700 Subject: [Edu-sig] general newbie guidance In-Reply-To: Message-ID: <4.2.0.58.20010806104428.00c05910@pop3.norton.antivirus> Hi Jeffry -- I'm curious what platform your students will have, the ratio of students to computers, the presence or absence of a network, connection to the internet etc. I reason I ask is that I think it'd be nifty to demonstrate object-oriented thinking using very simple classes and subclasses, just to give the idea of what it means to inherit functionality by subclassing, then turn to something more complicated like others here have posted about: e.g. maybe subclass FancyURLopener in urllib: >>> import urllib >>> class Pyorg(urllib.FancyURLopener): """ Does little except demonstrate inheritance with overriding, invoking parent class methods """ def __init__(self): self.parent = self.__class__.__bases__[0] self.parent.__init__(self) self.geturl = "http://www.python.org/" self.getfile = "index.html" def retrieve(self): """invoke parent version with preset args""" return self.parent.retrieve(self, self.geturl,self.getfile) >>> myopener = Pyorg() >>> local = myopener.retrieve() >>> local[1].dict # local[1] is a mimetools.Message instance {'last-modified': 'Fri, 03 Aug 2001 21:08:05 GMT', 'content-length': '12098', 'etag': '"5a7510-2f42-3b6b12b5"', 'date': 'Mon, 06 Aug 2001 19:33:53 GMT', 'accept-ranges': 'bytes', 'content-type': 'text/html', 'connection': 'close', 'server': 'Apache/1.3.20 (Unix)'} >>> myopener.close() By going back and forth between simple abstractions (yet hands-on), and stuff with a "real world" feel, I bet you can refine student understanding without dampening their initial enthusiasm. Given how much Python source is included in the Standard Library, I think just popping some of the modules and eyeballing them, to get a feel for what full-blown Python really looks like, would be helpful, as a kind of before/after test (do it towards the beginning of the course, then again towards the end -- students should feel a difference, in the sense of increased readability, more comprehension on the 2nd or 3rd pass). I think a key question facing any teacher of the topic is how much coding she or he might want to do ahead of time, and make available in module form. Just having student names in a dictionary, or a Student class with students instantiating personal objects, filling in various fields (e.g. fill in birth date, use object.age() function to get back current age to the day), might help personalize the experience. In addition, there's a question of whether you'll want to be doing stuff on the web, i.e. doing exercises or background readings/links in HTML in support of this class. In my ideal classroom, there's a computer projector, so the teacher can show (a) web pages (b) Python in interactive shell mode (c) Python code in IDLE's or some other text editor etc. Another question is how to balance using power tools as black boxes (e.g. pre-written modules, perhaps with subclassable classes) and how much basic background material to explore. Learning about bits and bytes, variable types, the built-in data structures, and looking at a few algorithms in detail, is certainly one way to go. Math-heavy and math- lite also mark two ends of a spectrum. Do your students need background in hexadecimal numbers? Probably, as K-12 often fails to cover this highly relevant topic nowadays. Just thinking out loud here, and not claiming to have the answers. Like you, I'm curious about what results teachers in the field are getting. Most of my teaching has been over the internet with unseen others -- when I do one on one stuff, it's usually not around using Python directly. Kirby From pobrien@orbtech.com Tue Aug 7 14:43:48 2001 From: pobrien@orbtech.com (Patrick K. O'Brien) Date: Tue, 7 Aug 2001 08:43:48 -0500 Subject: [Edu-sig] Announce: PythonCard just posted a new release Message-ID: I know I haven't been here in a while, and that is because I've been heavily involved in two projects. One is PythonCard, which is a software construction kit (in the spirit of Apple's HyperCard) written in Python. A new version has just been released and development is progressing steadily. You might want to take a look if you have an interest in building GUI apps in Python with the same ease as HyperCard. The other project is PyCrust. It seems that every so often people on the tutor and/or edu lists talk about developing a custom python shell to do tutorials and such. Well, one of the neat things about PythonCard is its built-in shell window, which allows you to manipulate all parts of your application at runtime, with all the syntax coloring, call tips and auto-complete features that you would expect from a python shell. PythonCard uses a plug-in python shell, called PyCrust, which is available for use in any python project. You can learn more about PyCrust at http://sourceforge.net/projects/pycrust/. You can learn more about PythonCard at http://sourceforge.net/projects/pythoncard/ and the details of its latest release are included below. Both projects have mailing lists that you can join and we would love to have more participants. Consider this an invitation. --- Patrick K. O'Brien Orbtech "I am, therefore I think." -----Original Message----- From: Kevin Altis [mailto:altis@semi-retired.com] Sent: Monday, August 06, 2001 9:48 PM To: Pythoncard Subject: [pythoncard] Announce: PythonCardPrototype release 0.3 http://sourceforge.net/project/showfiles.php?group_id=19015 Changes since 0.2.1 added changelog.txt and readme.txt files menubar is now optional if a 'menubar' key is not found in a Stack's resource file then a menubar won't be created. log.py documented proof.py updated to work with log.py changes MessageEvent was removed from proof.py since message sending bewteen widgets is currently disabled The working directory is changed to the directory of the main resource file such as minimal.rsrc.py when PythonCard starts up to avoid problems with filenames in the .rsrc.py files and any data files used by the application. Property Editor and Shell windows can be overlapped by the main app window Due to a bug, the Message Watcher must still remain on top added getCurrentBackground to PythonCardApp class PythonCard now includes PyCrust (-s on command-line) interactivePrompt renamed to shell, all references changed PyCrustFrame class moved to debug.py along with test for PyCrust import PyCrust shell is version 0.3 PythonCard turned into PythonCardPrototype package All samples changed to use the new package naming All samples can now be run "standalone" so any _standalone.py files in the samples have been removed. __version__.py contains the current release number New cvs tree on SourceForge, the old proto tree is no longer used PythonCard.py renamed to loader.py and loader.py overhauled added deleteWidget method added find, deprecated findByName added turtle graphics sample added a Property Editor (-p on command-line) due to time constraints, the Property Editor is only a property viewer in this release. You can use the set methods for widgets to change values inside the shell if you need to. added gainFocus and loseFocus messages to all widgets added StaticLine widget ComponentSpec and AttributeSpec classes added to enhance parsing of spec.py ka --- Kevin Altis altis@semi-retired.com ------------------------ Yahoo! Groups Sponsor ---------------------~--> Small business owners... Tell us what you think! http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/saFolB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: pythoncard-unsubscribe@yahoogroups.com Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ From Arthur_Siegel@rsmi.com Tue Aug 7 17:34:43 2001 From: Arthur_Siegel@rsmi.com (Arthur_Siegel@rsmi.com) Date: Tue, 7 Aug 2001 11:34:43 -0500 Subject: [Edu-sig] ANNOUNCE - PyGeo,redux Message-ID: <008C810B.N22121@rsmi.com> New improved, with VPython rendering and all the good things attendant (Povray export). And a decent site: home.netcom.com/~ajs >From the README: What is PyGeo? --------------- PyGeo is a Dynamic Geometry toolset, written in Python, dependencies on Python's Numeric and VPython extensions. It defines a set of geometric primitives in 3d space and allows for the construction of geometric models that can be interactively manipulated, while defined geometric relationships remain invariant. It was created for, and is therefore particularly suitable for, the visualization of concepts of Projective Geometry. Doesn't sound like it from the above description, but its fun. It is also, hopefully: A take-apart toy for folks trying to learn programming A insult to the "Old Dog, New Tricks" adage - having been created by a middle-ager without significant prior math or programming background. A work-in-process. HELP WANTED. From WHITSTON@ltu.edu Wed Aug 8 14:23:39 2001 From: WHITSTON@ltu.edu (WHITSTON@ltu.edu) Date: Wed, 08 Aug 2001 09:23:39 -0400 (EDT) Subject: [Edu-sig] Programs/Projects suggestions wanted Message-ID: <01K6VVTIEEFM934UUN@LTU.EDU> To all: I will be teaching an Introduction to Programming class to incoming college freshman (engineering and computer science students) using Python (and VPython) this fall. The class meets twice a week for 15 weeks. For most of these students, Python will be their first true programming language, and so the purpose of the class is to get them to understand how to design simple algorithms (i.e. input/calculate/output loops mostly) and translate those algorithms into programs or functions. The current language is "C" and most of these students fight the syntax all term without gaining any good programming skills. With this background, I would like some suggestions for programs/projects that these students would find interesting and/or fun. I have checked the archives and I will be including the "Game of Life". Other programs/projects include "Odd order Magic Squares", "Prime number sieves", and "word occurrences in Shakespeare's plays" along with a variety of simpler programs which lead to these projects. I will summarize any suggestions and report back to group later (anyone planning on attending SIG-CSE 2002?) Thank you for any help in this area. Howard Whitston Instructional Technology Specialist/Adjunct Professor Lawrence Technological University whitston@ltu.edu From rob@jam.rr.com Wed Aug 8 14:48:43 2001 From: rob@jam.rr.com (Rob Andrews) Date: Wed, 8 Aug 2001 08:48:43 -0500 Subject: [Edu-sig] Programs/Projects suggestions wanted In-Reply-To: <01K6VVTIEEFM934UUN@LTU.EDU> Message-ID: We have quite a collection of novice challenges at Useless Python. There are hundreds of programming contest problems, our own Python Challenges (just ideas of neat things to do), and over 100 examples of working Python source code sent in by people learning the language. You should be able to find some appropriate material there: http://www.lowerstandard.com/python <-- Useless Python hopefully helpful, Rob Your one-stop shop for newbie source code! Useless Python: http://www.lowerstandard.com/python/ # -----Original Message----- # From: edu-sig-admin@python.org [mailto:edu-sig-admin@python.org]On # Behalf Of WHITSTON@ltu.edu # Sent: Wednesday, August 08, 2001 8:24 AM # To: EDU-SIG@python.org # Subject: [Edu-sig] Programs/Projects suggestions wanted # # # To all: # # I will be teaching an Introduction to Programming class to # incoming college # freshman (engineering and computer science students) using Python (and # VPython) this fall. The class meets twice a week for 15 # weeks. For most of # these students, Python will be their first true programming # language, and so # the purpose of the class is to get them to understand how to # design simple # algorithms (i.e. input/calculate/output loops mostly) and # translate those # algorithms into programs or functions. The current language # is "C" and most # of these students fight the syntax all term without gaining any good # programming skills. # # With this background, I would like some suggestions for # programs/projects that # these students would find interesting and/or fun. I have # checked the archives # and I will be including the "Game of Life". Other # programs/projects include # "Odd order Magic Squares", "Prime number sieves", and "word # occurrences in # Shakespeare's plays" along with a variety of simpler programs # which lead to # these projects. # # I will summarize any suggestions and report back to group # later (anyone # planning on attending SIG-CSE 2002?) # # Thank you for any help in this area. # # Howard Whitston # Instructional Technology Specialist/Adjunct Professor # Lawrence Technological University # whitston@ltu.edu # # _______________________________________________ # Edu-sig mailing list # Edu-sig@python.org # http://mail.python.org/mailman/listinfo/edu-sig From pobrien@orbtech.com Wed Aug 8 21:51:41 2001 From: pobrien@orbtech.com (Patrick K. O'Brien) Date: Wed, 8 Aug 2001 15:51:41 -0500 Subject: [Edu-sig] Announce: PyCrust 0.5 release now available Message-ID: PyCrust version 0.5 has been committed to CVS and is also available as a .zip file at http://sourceforge.net/project/showfiles.php?group_id=31263&release_id=47302 . Please give it a try and see what you think. PyCrust is an interactive Python Shell that can be run standalone, or integrated into other Python applications built with wxPython. PyCrust is built around Scintilla, and requires wxPython and Python 2.1 or greater. http://sourceforge.net/projects/pycrust/ --- Patrick K. O'Brien Orbtech "I am, therefore I think." From pobrien@orbtech.com Wed Aug 8 22:11:53 2001 From: pobrien@orbtech.com (Patrick K. O'Brien) Date: Wed, 8 Aug 2001 16:11:53 -0500 Subject: [Edu-sig] Sorry about the PyCrust cross-posting Message-ID: Big time mistake. I really messed up when I cross-posted that announcement. It won't happen again. Please accept my apologies. --- Patrick K. O'Brien Orbtech "I am, therefore I think." From urnerk@qwest.net Fri Aug 10 05:38:12 2001 From: urnerk@qwest.net (Kirby Urner) Date: Thu, 09 Aug 2001 21:38:12 -0700 Subject: [Edu-sig] Another 'Python in Education' website... Message-ID: <4.2.0.58.20010809213657.00c0b510@pop3.norton.antivirus> Local Oregon site, software industry reaching out to the high school teaching community. http://www.oregon-tips.com/tips/Public/PublicHomePage Kirby From urnerk@qwest.net Sat Aug 11 04:33:33 2001 From: urnerk@qwest.net (Kirby Urner) Date: Fri, 10 Aug 2001 20:33:33 -0700 Subject: [Edu-sig] Is Edu-Sig owner a subscriber? Message-ID: <4.2.0.58.20010810203025.00c0ad10@pop3.norton.antivirus> Apologies for putting this into list traffic, but sent to edu-sig-owner originally with no reply/action. How hard would it be to make the SIGs searchable BTW? Here's a case where finding that short flurry of posts wherein Guido transferred ownership would remind me who took over -- but I don't have an easy way to search the archives by keyword (do I?). Other stuff I'd like to search as well. Kirby =================== To: edu-sig website maintainer: Greetings -- There's a link to: Overcoming the prejudice An essay by Kirby Urner about using Python in the math classroom on http://www.python.org/sigs/edu-sig/ It points to a draft posted to the edu-sig listserv. On my browser, it comes up with a lot of extraneous characters (=20 line ends etc). I have a web version of that essay you could link to instead, at: http://www.inetarena.com/~pdx4d/ocn/overcome.html I would encourage you to link there instead. Kirby From dyoo@hkn.eecs.berkeley.edu Sat Aug 11 06:53:18 2001 From: dyoo@hkn.eecs.berkeley.edu (Danny Yoo) Date: Fri, 10 Aug 2001 22:53:18 -0700 (PDT) Subject: [Edu-sig] Is Edu-Sig owner a subscriber? In-Reply-To: <4.2.0.58.20010810203025.00c0ad10@pop3.norton.antivirus> Message-ID: On Fri, 10 Aug 2001, Kirby Urner wrote: > > Apologies for putting this into list traffic, but sent > to edu-sig-owner originally with no reply/action. > > How hard would it be to make the SIGs searchable BTW? > Here's a case where finding that short flurry of posts > wherein Guido transferred ownership would remind me > who took over -- but I don't have an easy way to search > the archives by keyword (do I?). > > Other stuff I'd like to search as well. I think this is possible through ActiveState's archives here: http://aspn.activestate.com/ASPN/Mail/Archives/edu-sig/ It appears to be a full-text search thing, but it's fairly good. Hope this helps! From pdx4d@teleport.com Sat Aug 11 18:16:27 2001 From: pdx4d@teleport.com (Kirby Urner) Date: Sat, 11 Aug 2001 10:16:27 -0700 Subject: [Edu-sig] Is Edu-Sig owner a subscriber? In-Reply-To: References: <4.2.0.58.20010810203025.00c0ad10@pop3.norton.antivirus> Message-ID: <4.2.0.58.20010811101532.00d205f0@pop3.norton.antivirus> > >I think this is possible through ActiveState's archives here: > > http://aspn.activestate.com/ASPN/Mail/Archives/edu-sig/ > >It appears to be a full-text search thing, but it's fairly good. > > >Hope this helps! Definitely helps! Didn't know about this facility. Took only a few seconds to find the info I wanted, and I look forward to using it more. Many thank yous. Kirby From wilson@visi.com Sun Aug 12 03:20:58 2001 From: wilson@visi.com (Timothy Wilson) Date: Sat, 11 Aug 2001 21:20:58 -0500 (CDT) Subject: [Edu-sig] Is Edu-Sig owner a subscriber? In-Reply-To: <4.2.0.58.20010810203025.00c0ad10@pop3.norton.antivirus> Message-ID: On Fri, 10 Aug 2001, Kirby Urner wrote: > Apologies for putting this into list traffic, but sent > to edu-sig-owner originally with no reply/action. Sorry Kirby. I must have missed your post amid the daily onslaught of my other email traffic. -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.org | http://www.zope.com W. St. Paul, MN | | http://slashdot.org wilson@visi.com | | http://linux.com From pobrien@orbtech.com Fri Aug 17 01:42:50 2001 From: pobrien@orbtech.com (Patrick K. O'Brien) Date: Thu, 16 Aug 2001 19:42:50 -0500 Subject: [Edu-sig] ANN: PythonCard Prototype 0.4.1 Message-ID: I'm sending this on behalf of the PythonCard project. Enjoy. --- Patrick K. O'Brien Orbtech "I am, therefore I think." PythonCard is a software construction kit (in the spirit of Apple's HyperCard) written in Python. You can download the latest release at: http://sourceforge.net/project/showfiles.php?group_id=19015 Samples included in the latest release: conversions, dialogs, findfiles, minimal, proof, searchexplorer, sounds, SourceForgeTracker, tictactoe, turtle, widgets, worldclock To see screenshots of some of the samples, visit: http://pythoncard.sourceforge.net/samples.html PythonCard home page http://pythoncard.sourceforge.net/ SourceForge summary page http://sourceforge.net/projects/pythoncard/ Mailing list http://groups.yahoo.com/group/pythoncard/ PythonCard requires Python 2.1 or later and wxPython 2.3.x. wxPython is available at http://www.wxpython.org/ PythonCard relies on wxPython, it will support the Macintosh once wxPython has been ported to the Mac. PyCrust 0.5.2 PyCrust by Patrick K. O'Brien is included as part of the PythonCardPrototype releases. If you would like to find our more about PyCrust or get a separate distribution, please visit the home page at http://sourceforge.net/projects/pycrust/ ---------------------------- Changes since release 0.3.1 (2001-08-07): The Property Editor is still only able to display widget attributes, you'll have to use the Shell to actually change an attribute. The Property Editor will work in the next release, and this time I mean it. :) Release 0.4.1 2001-08-16 updated debug.py and pycrustrc.py to support PyCrust 0.5.2 due to changes between PyCrust 0.5.2 and earlier versions you must use the latest version of Pycrust with PythonCard, which is included in the release .zip for convenience added 'border' attribute to TextField and its subclasses to support a 'none' wxNO_BORDER option. updated worldclock and test_widgets.py to show TextField with a border of 'none' used in place of StaticText added empty bitmap support. Image and ImageButton now use the Bitmap class rather than an explicit wxBitmap. the convention is that if the file is '' then an empty bitmap is created. see SourceForgeTracker for an example of the use of empty bitmaps if the layout doesn't look right on Linux or Solaris, you can use the SourceForgeTracker.original.rsrc.py file by renaming it to SourceForgeTracker.rsrc.py fixed worldclock and tictactoe samples to use Bitmap Release 0.4 2001-08-14 added components dictionary find/findByName, createWidget, and deleteWidget were replaced by a dictionary, so that widgets on a background can be accessed as: self.components.button1 see the samples for numerous examples of the new usage. widgets now use dot notation to access their attributes print button1.label # get button1.label = 'hello' # set This was a major revision to widget.py that also impacted many other parts of the framework, so if you have any samples of your own done with release 0.3.1 or earlier, you'll need to update your code. updated all samples to use the new dot notation all widget attributes that can only be set at initialization will now throw an AttributeError if you try and change them. for example button1.name = 'bob' is not legal so you get: 'AttributeError: name attribute is read-only' *** note that while updating all the widget attributes to dot notation I realized that we had never cleaned up the 'selected' attribute for List, RadioGroup, and Choice, so be aware that the name and behavior of 'selected' will probably change in the next release PyCrust is now included as a separate package numerous changes were made to the PyCrust shell, see the PyCrust docs for more information. fixed backgroundColor and foregroundColor in class Background the widgets sample has a button to change the backgroundColor to show off this fix. added pycrustrc.py files whatever python code is in these files will be executed when the shell is first launched. there is a default pycrustrc.py in the package directory. there is another example in the turtle sample directory. changed pythoncard.config.py added options to set the position and size of all the "debug" windows: Message Watcher, Property Editor, Shell added pythoncard.user.config.py this file will override pythoncard.config.py if it exists you should copy pythoncard.user.config.py and update the position of each window for your own screen dimensions; you can update the shell size too added defaultStackPosition option you can add a key:value line to pythoncard.user.config.py to override the stack position that a PythonCard app may or may not specify. The most common would be something like 'defaultStackPosition':(5, 5), to force the window to the top-left of the screen (I prefer this over (0, 0) myself. added 'Debug' menu if any of the 'debug' windows are requested when an application is started, then all of the windows will be created, but only the requested ones will be shown initially. you can choose the window name from the Debug menu to show/hide the window. added an About PythonCard... menu item to the Debug menu displays version numbers and PythonCard project info added SourceForgeTracker sample downloads XML from SourceForge tracker database to display Bug Reports and Feature Requests for the following projects: PyChecker, PyCrust, Python, PythonCard, wxPython. Additional projects can be added. added conversions sample does Fahrenheit <-> Celsius and English <-> Morse Code conversions with a generic framework, so other conversions can be added added tutorial.txt to docs applications can now use the .pyw extension if you don't want an application to have a console window, then rename the application to .pyw, but don't change the file reference in the .rsrc.py file, leave that as .py as an example, you can change worldclock.py to worldclock.pyw ka --- Kevin Altis altis@semi-retired.com _______________________________________________ wxpython-users mailing list wxpython-users@lists.wxwindows.org http://lists.wxwindows.org/mailman/listinfo/wxpython-users From alan.gauld@bt.com Sun Aug 19 18:00:06 2001 From: alan.gauld@bt.com (alan.gauld@bt.com) Date: Sun, 19 Aug 2001 18:00:06 +0100 Subject: [Edu-sig] Off topic musings Message-ID: <5104D4DBC598D211B5FE0000F8FE7EB20E66BEB2@mbtlipnt02.btlabs.bt.co.uk> Some time ago I posted the following musings to my work colleagues and a few of us chased it around for a while. I came across it recently and thought the ideas might be of some interest to the members of these lists. If anyone knows of resources please let me know... ----------- Included text --------------- I read a collection of papers on Software Engineering recently published by the IEEE and edited by Professor Richard Thayer (and his friend). One recurring theme in these "State of the Practice" papers was the lack of a fundamental theoretical basis for computing. i.e. there's nothing comparable to the laws of physics in software engineering. I started thinking and doodling about what the fundamentals are and came up with several notions (ideas would imply something far too well formed!) These are based around the concept that software manipulates data or more correctly "information"(no surprises there! :). However most information theory (Shannon et al) relates to bits. Far too low level to be useful. That started me thinking about levels of information and I came up with 3 layers of information - rather like an OSI comms model: 1/ Physical - bits/bytes, defined by the machine architecture operations are CPU specific, include bitwise OR/AND/NOT and binary arithmetic... 2/ Implementation/Environment - data types defined by the programming environment - object in Smallktalk; int, float, char in C etc... Operations include built in operators for arithmetic, boolean logic and I/O. [Question: Where do collections: arrays, lists etc fit into the layer proposal?] 3/ Application - User defined data types - records, files, RDBMS Tables etc Operations are user defined functions/procedures etc. Other candidate layers include "Standard libraries" etc, but I rejected these as a subset of either Implementation or Application layers. To be useful any fundamental basis of software would have to express concepts which applied with equal validity across all layers. - ie not be dependant on data format, or semantics but simply relate to *relative* information content. Operations would need to be expressable in terms of data transforms across and within layers. I could go on (onto the nature of operations!) but that's probably enough for now. Now the big question is: Since I am sure this isn't original, who has done this stuff before? - Where can I get papers or books on fundamental information representation/transformation theory? I assume there must be something? somewhere? [ Note: I am not talking about Knowledge Engineering which has more to do with how information is stored and processed than what information is, its empirical qualities etc... ] Alan Gauld BT computing partners Tel : 0141 220 8795 Fax : 0141 248 1284 From dyoo@hkn.eecs.berkeley.edu Mon Aug 20 02:50:42 2001 From: dyoo@hkn.eecs.berkeley.edu (Danny Yoo) Date: Sun, 19 Aug 2001 18:50:42 -0700 (PDT) Subject: [Edu-sig] Re: [Tutor] Off topic musings In-Reply-To: <5104D4DBC598D211B5FE0000F8FE7EB20E66BEB2@mbtlipnt02.btlabs.bt.co.uk> Message-ID: On Sun, 19 Aug 2001 alan.gauld@bt.com wrote: > One recurring theme in these "State of the Practice" papers > was the lack of a fundamental theoretical basis for computing. > i.e. there's nothing comparable to the laws of physics in > software engineering. [some text cut] > Since I am sure this isn't original, who has done this stuff > before? - Where can I get papers or books on fundamental > information representation/transformation theory? I assume > there must be something? somewhere? David Gries has written a book called "The Science of Programming" which states a framework for writing mathematicaly correct programs. I bought it after seeing Jon Bentley's recommendation in "Programming Pearls". As is typical with me, I haven't really gotten past Chapter One yet. *grin* Still, from what I can glean, Gries uses the power of logic and assertions to show how people can be confident in a program's correctness. There's also a chapter on "inverting" programs which looks like a lot of fun. From alan.gauld@bt.com Mon Aug 20 10:44:11 2001 From: alan.gauld@bt.com (alan.gauld@bt.com) Date: Mon, 20 Aug 2001 10:44:11 +0100 Subject: [Edu-sig] RE: [Tutor] Off topic musings Message-ID: <5104D4DBC598D211B5FE0000F8FE7EB20E66BEB5@mbtlipnt02.btlabs.bt.co.uk> > > One recurring theme in these "State of the Practice" papers > > was the lack of a fundamental theoretical basis for computing. > > i.e. there's nothing comparable to the laws of physics in > > software engineering. > > David Gries has written a book called "The Science of > Programming" which states a framework for writing mathematicaly correct > programs. Yes, there are many books and papers on programming correctness but few on the nature of information. Specifically I am intereted in any work on layering of information structures. Looking at how information itself is structured and operated upon. This is different to programming which is only one very narrow subset ofg information processing. Alan g. From delza@alliances.org Mon Aug 20 19:00:04 2001 From: delza@alliances.org (Dethe Elza) Date: Mon, 20 Aug 2001 11:00:04 -0700 Subject: [Edu-sig] Off topic musings References: <5104D4DBC598D211B5FE0000F8FE7EB20E66BEB2@mbtlipnt02.btlabs.bt.co.uk> Message-ID: <3B815024.6070403@alliances.org> For the OSI-like model you might want to break it up a bit further: 1 / Physical - bits and bytes defined by machine architecture. 2 / Machine-specific - this is the actual instruction set for a given machine 3 / Implementation - this includes data primitives of the given language. 4 / Implementation Groupings - collections, arrays, lists and structured types which are built into the language. 5 / Application - Developer-defined data types and tie-ins with other systems (RDBMS, etc). 6 / Extensions - Plugins or enhancements which are not part of the original program, but operate within it's context and add additional information structure. (Would XML go here?) 7 / User-defined - Some programs allow the user to extend the data set (by embedding Python, say). Hmmm. I probably should have numbered from zero, my bad %-) --Dethe 1/ Physical - bits/bytes, defined by the machine architecture operations are CPU specific, include bitwise OR/AND/NOT and binary arithmetic... 2/ Implementation/Environment - data types defined by the programming environment - object in Smallktalk; int, float, char in C etc... Operations include built in operators for arithmetic, boolean logic and I/O. [Question: Where do collections: arrays, lists etc fit into the layer proposal?] 3/ Application - User defined data types - records, files, RDBMS Tables etc Operations are user defined functions/procedures etc. (Alan, sorry about the duplicate, I keep forgetting that reply doesn't go to the group on this list). -- Dethe Elza (delza@burningtiger.com) Chief Mad Scientist Burning Tiger Technologies (http://burningtiger.com) -- Dethe Elza (delza@burningtiger.com) Chief Mad Scientist Burning Tiger Technologies (http://burningtiger.com) From delza@alliances.org Mon Aug 20 19:01:29 2001 From: delza@alliances.org (Dethe Elza) Date: Mon, 20 Aug 2001 11:01:29 -0700 Subject: [Edu-sig] Off topic musings References: <5104D4DBC598D211B5FE0000F8FE7EB20E66BEB2@mbtlipnt02.btlabs.bt.co.uk> Message-ID: <3B815079.10404@alliances.org> Related to the discussion of the "levels of information." There is a "levels of abstraction: Class - a group of related data and functionality Property - data belonging to a class/object which may be a variable or the result of a computation Pattern - a generalization of a recurring problem and its solution set Idiom - a pattern within the context of a given language Framework - a collection of related idioms packaged into a standalone unit Aspect - A cross-section of one consideration in a program (say, Security), factored out to make it modular Module - Some amount of functionality which is packaged as a standalone unit Component - A class or collection of classes which are packaged as a standalone unit and can be swapped in and out of a system. Library - A collection of functionality packaged for re-use Distributed Component - A component which spreads its functionality across multiple computers. Guideline - A recommendation for use, more specific than a pattern. Style Guideline - Standards for presenting code for maintenance. Documentation - Details about the documented system, high-level programs for human metacomputers. Pattern Language - A group of patterns which are mutually supporting or related Don't know how useful this is to anyone. Most of these relate to the tenets of pattern design and OO: * Seperate what changes from what stays the same (or things which change with different frequencies). * Solve problems by adding a layer of abstraction * Work at as high a level as possible to promote clarity. Clarity is the key for maintainable and extensible systems. -- Dethe Elza (delza@burningtiger.com) Chief Mad Scientist Burning Tiger Technologies (http://burningtiger.com) From bsass@freenet.edmonton.ab.ca Mon Aug 20 19:24:41 2001 From: bsass@freenet.edmonton.ab.ca (Bruce Sass) Date: Mon, 20 Aug 2001 12:24:41 -0600 (MDT) Subject: [Edu-sig] RE: [Tutor] Off topic musings In-Reply-To: <5104D4DBC598D211B5FE0000F8FE7EB20E66BEB5@mbtlipnt02.btlabs.bt.co.uk> Message-ID: On Mon, 20 Aug 2001 alan.gauld@bt.com wrote: <...> > Yes, there are many books and papers on programming correctness but > few on the nature of information. Specifically I am intereted in > any work on layering of information structures. Looking at how > information itself is structured and operated upon. This is different > to programming which is only one very narrow subset ofg information > processing. I think the Philosophy of Language section in the library would be the place to start. Unless I'm completely misunderstanding you, you are interested in how information becomes data, gets manipulated, then spit out as information again... which seems analagous to what we do everyday when we look at something in the world, extract those features we think are important, then express the result of our machinations in terms that relate them to some other concern. - Bruce From alan.gauld@freenet.co.uk Mon Aug 20 19:58:16 2001 From: alan.gauld@freenet.co.uk (alan.gauld@freenet.co.uk) Date: Mon, 20 Aug 2001 19:58:16 +0100 Subject: [Edu-sig] RE: [Tutor] Off topic musings In-Reply-To: References: <5104D4DBC598D211B5FE0000F8FE7EB20E66BEB5@mbtlipnt02.btlabs.bt.co.uk> Message-ID: <19054435989452@mailth4.freenet.co.uk> On 20 Aug 01, at 12:24, Bruce Sass wrote: > > Yes, there are many books and papers on programming correctness but > > few on the nature of information. > > I think the Philosophy of Language section in the library would be the > place to start. Now thats an interesting idea. Lateral thinking indeed. One previous poster suggester I read Godel, Escher, Bach which is going in the same direction, but doesn't really quite get there either... > Unless I'm completely misunderstanding you, you are > interested in how information becomes data, gets manipulated, then > spit out as information again... Maybe. Really I'm just interested in what exactly a theoretical basis for software engineering would look like. The papes I was reading suggested that we may be reaching the point in CS research where we cannot progress further without an underlying theoretical base (like electrical theory underpins electronics which is in turn underpinned by atomic/molecular/ionic theory). But what is that theory? For instance we have Shannons stuff on the information content of bitstreams, WE have Date/Cobbs work on databases, we have Moore and Mealy's work on finite state automota and of course Boole's work on logic and binary arithmetic but there is little of anything unifying these things. Finding the unifying thread that ties together the various strands of CS in the same way electon theory pulls together everything in electronics is the big challenge in advancing CS. Alan G. From fred@ontosys.com Mon Aug 20 20:26:05 2001 From: fred@ontosys.com (fred@ontosys.com) Date: Mon, 20 Aug 2001 14:26:05 -0500 Subject: [Edu-sig] RE: [Tutor] Off topic musings In-Reply-To: <19054435989452@mailth4.freenet.co.uk>; from alan.gauld@freenet.co.uk on Mon, Aug 20, 2001 at 07:58:16PM +0100 References: <5104D4DBC598D211B5FE0000F8FE7EB20E66BEB5@mbtlipnt02.btlabs.bt.co.uk> <19054435989452@mailth4.freenet.co.uk> Message-ID: <20010820142605.A30638@ontosys.com> On Mon, Aug 20, 2001 at 07:58:16PM +0100, alan.gauld@freenet.co.uk wrote: > Really I'm just interested in what exactly a theoretical > basis for software engineering would look like. You might be interested in some of Tony Hoare's recent work on "Unified Theories of Programming". See the links at the bottom of . (For some reason the PDFs reached by those links look really bad in Acrobat Reader on my NT machine.) -- Fred Yankowski fred@OntoSys.com tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA From bsass@freenet.edmonton.ab.ca Mon Aug 20 23:49:53 2001 From: bsass@freenet.edmonton.ab.ca (Bruce Sass) Date: Mon, 20 Aug 2001 16:49:53 -0600 (MDT) Subject: [Edu-sig] RE: [Tutor] Off topic musings In-Reply-To: <19054435989452@mailth4.freenet.co.uk> Message-ID: On Mon, 20 Aug 2001 alan.gauld@freenet.co.uk wrote: > On 20 Aug 01, at 12:24, Bruce Sass wrote: > > > Yes, there are many books and papers on programming correctness but > > > few on the nature of information. > > > > I think the Philosophy of Language section in the library would be the > > place to start. > > Now thats an interesting idea. Lateral thinking indeed. > One previous poster suggester I read Godel, Escher, Bach > which is going in the same direction, but doesn't really quite > get there either... > > > Unless I'm completely misunderstanding you, you are > > interested in how information becomes data, gets manipulated, then > > spit out as information again... > > Maybe. Really I'm just interested in what exactly a theoretical > basis for software engineering would look like. The papes I was > reading suggested that we may be reaching the point in CS > research where we cannot progress further without an underlying > theoretical base (like electrical theory underpins electronics which > is in turn underpinned by atomic/molecular/ionic theory). > > But what is that theory? For instance we have Shannons stuff on > the information content of bitstreams, WE have Date/Cobbs work > on databases, we have Moore and Mealy's work on finite state > automota and of course Boole's work on logic and binary > arithmetic but there is little of anything unifying these things. They are all representations of something in the real world, communicated in a form that best fits a particular forum. I would expect a GUT of Programming to explain how ones takes an arbitrary phenomena and represents it in an arbitrary computing language... > Finding the unifying thread that ties together the various strands of > CS in the same way electon theory pulls together everything in > electronics is the big challenge in advancing CS. ...the problem is the translation from real to representation, it depends on what aspects of the phenomena are deemed important enough to translate, which depends on the forum the translation is targeted at, and those involve value judgements. The big difference between CS and physics is that with the latter there is always a correct answer (within measurable limits of accuracy and precision), value judgements are never correct except within the confines of a particular belief system. Would a GUToP be like a theory in physics, or more like a philosophical treatise? That is why I would go to the philosophy section, rather than the science section, of the library if I was looking for relevant works. I would further narrow my search down to PoL, because that is the branch of philosophy concerned with the mechanics of representations and communication of ideas -- which is exactly what computing languages are all about. - Bruce From smorris@cereva.com Tue Aug 21 03:06:29 2001 From: smorris@cereva.com (Morris, Steve) Date: Mon, 20 Aug 2001 22:06:29 -0400 Subject: [Edu-sig] RE: [Tutor] Off topic musings Message-ID: <8010912471E0D41189930090278D4E48E154F7@SPAWN> > > Maybe. Really I'm just interested in what exactly a theoretical > > basis for software engineering would look like. The papes I was > > reading suggested that we may be reaching the point in CS > > research where we cannot progress further without an underlying > > theoretical base (like electrical theory underpins > > electronics which > > is in turn underpinned by atomic/molecular/ionic theory). I think you are comparing apples and oranges here. I think your vision of software engineering is too narrow. Electrical theory explains a finite set of observed electrical properties. Software is a language that can express too much to be stated in a single theory. It is too expressive. You might as well try to make a general theory of communication which covers all possible communication, speech, evocation, persuasion, poetry, art and expression. Software engineering would then be a substantial subset of this general theory. In order to have a meaningful theoretical discussion you must break down the subject into a finite set of rational observable components with observable relations between them. You then attempt theories to explain what you observe. The problem with communication (of which software engineering is a subset) is that it is infinitely extensible. As long as there are new areas of software problems to solve we can't put a bound on it. It is not even clear what you mean when you ask what a "theoretical basis of software engineering would look like." Engineering doesn't have theories. Science has theories; engineers apply these theories to solve specific problems. You would do better to think of a specific aspect of software engineering that you think needs explaination. Without specific questions you will never have useful theories. When you narrow your self to specific questions you will likely find plenty of literature that discuss them. Be careful or you will fall down the rabbit hole that has swallowed literary criticism, chasing meaningless but pretty ideas that go nowhere, lost in endless reflections of ideas that seem like they must mean something but can't be nailed down. This is the curse of language, many more things can be said than have meaning. You don't start with a theory, you start with specific questions and observations that need explaination. Theories provide possible and hopefully testable explainations. The results suggested by these theories, once validated as useful and predictive, can be the basis for the next level of theories. Let me give a specific example. You don't ask for a theory of physics. Physics is too general a thing to have one theory. On the other hand we have a set of theories which describe various fields; gravitation, electromagnetic, strong and weak forces. These theories are pretty mature and usefully and predidictively explain the specific fields. These field theories have a lot in common and now that they are well developed and tested it is worthwhile looking for a unified field theory in which the specific fields are merely special cases. Physicists have been hoping for this one for 80 years. You try to build a general theory when the specific theories are well understood. This does not describe the condition of software engineering or even of so called "computer science." From matthias@ccs.neu.edu Tue Aug 21 03:55:55 2001 From: matthias@ccs.neu.edu (Matthias Felleisen) Date: Mon, 20 Aug 2001 22:55:55 -0400 (EDT) Subject: [Edu-sig] Re: Off topic musings In-Reply-To: (edu-sig-request@python.org) References: Message-ID: <200108210255.f7L2tt025376@alya.ccs.neu.edu> Hi Alan -- you are basically promoting the idea of driving program design via data descriptions. That is, since a program processes information, the laws of designing programs should be connected to the laws of describing information. In my terminology, information is what you find in the real world. Data is something in your language of choice that represents information. For example, in Fortran you may use 5 to represent 5cm, 5C, or $5. Over the past 30 years or so, PL designers have developed a basic language of data composition. It comes with a set of primitive operations (creation of data, extraction of values from compound data, mutation of data, recognition). The ideas (in pure form) are more or less based on the interpretation of set theory by the designer, and are thus more or less independent of the actual language (if it avoids connection between values and machine notions). One can indeed use a data description to derive programs, step by step. Our book for the TeachScheme! project (programming for high school students) is based on exactly this idea. Take a look, we distribute the book over the Web: http://www.htdp.org/ but you can also buy it :-) See the design recipes. They carry over to other FP-like languages, such as Python. I have worked with the idea for 15 years. They were developed in the functional programming community (starting with Burge's book in the early 70s). The community wasn't so much interested in correctness but in the systematic construction of programs. The layering of the idea was expounded in great detail in Abelson-and-Sussman's famous SICP. It's also on-line now. In contrast, the Hoare-Dijkstra-Gries school of thought was interested in correct algorithms. When you work in their (wp or sp) logic, you write the program first -- in an ad hoc manner, w/o any underlying laws -- in an extremely low-level quasi-functional language of logic. Then you derive the program again, by hand. One could some of that via machine. In any case, their work never truly scaled beyond procedure bodies, because they couldn't get anythig but :=, begin, while, and if to work completely. [Okay, I know there is more, but don't bother me with details. That's the gist of it.] -- Matthias From kevino@tulane.edu Tue Aug 21 05:48:15 2001 From: kevino@tulane.edu (Kevin Ollivier) Date: Tue, 21 Aug 2001 00:48:15 -0400 Subject: [Edu-sig] RE: [Tutor] Off topic musings References: <8010912471E0D41189930090278D4E48E154F7@SPAWN> Message-ID: <000b01c129fc$7e077580$097c2518@alngtn1.va.home.com> I have to say I agree with Steve Morris here - I see programming and thus to some extent software engineering as more of an art field than a science - after all, you are simply expressing your ideas to a computer. The "science" part is that you are given a solid, specific set of ways of expressing your ideas, and that it resembles a mathematical language to some extent, but that really hides the fact that you are still expressing ideas and can be as creative as you want in devising a solution to a problem. As Steve said, programming can be used to devise solutions to nearly any problem that comes our way - they are now starting to teach computers to speak, etc. Also, since a computer is a tool that we have created, we also control the "laws" which govern the design, operation and use of this tool. As I see it, laws are generally universal constants - a way to explain and predict the behavior of natural forces. Laws mean nothing when you can change them at will. We define the significance of bits and bytes, we create the programming languages which we use to create software, etc. We can also change those things, meaning they aren't held constant. The only 'laws' I see as applicable to computer science are those that it uses in creating these tools - i.e. electricity and conductivity. I think I see what this discussion is trying to get at though - the underlying abstract ideas which underscore software design. What is taught in class for most computer science programs is a whole lot of math, a lot of programming syntax, and all sorts of discussions of abstract programming concepts like objects, recursion, etc. While that's all nice and good, learning to code is not learning how to program. (Ever see a hacker write a messy and buggy solution to a problem? I have. I've done it! ^_^) I think what people are asking for are the "laws" of how to program - those few core ideas which makes one master the 'art' of programming. Am I right on this? Kevin ----- Original Message ----- From: "Morris, Steve" To: "Bruce Sass" Cc: Sent: Monday, August 20, 2001 10:06 PM Subject: RE: [Edu-sig] RE: [Tutor] Off topic musings > > > Maybe. Really I'm just interested in what exactly a theoretical > > > basis for software engineering would look like. The papes I was > > > reading suggested that we may be reaching the point in CS > > > research where we cannot progress further without an underlying > > > theoretical base (like electrical theory underpins > > > electronics which > > > is in turn underpinned by atomic/molecular/ionic theory). > > I think you are comparing apples and oranges here. I think your vision of > software engineering is too narrow. Electrical theory explains a finite set > of observed electrical properties. Software is a language that can express > too much to be stated in a single theory. It is too expressive. You might as > well try to make a general theory of communication which covers all possible > communication, speech, evocation, persuasion, poetry, art and expression. > Software engineering would then be a substantial subset of this general > theory. In order to have a meaningful theoretical discussion you must break > down the subject into a finite set of rational observable components with > observable relations between them. You then attempt theories to explain what > you observe. The problem with communication (of which software engineering > is a subset) is that it is infinitely extensible. As long as there are new > areas of software problems to solve we can't put a bound on it. > > It is not even clear what you mean when you ask what a "theoretical basis of > software engineering would look like." Engineering doesn't have theories. > Science has theories; engineers apply these theories to solve specific > problems. You would do better to think of a specific aspect of software > engineering that you think needs explaination. Without specific questions > you will never have useful theories. When you narrow your self to specific > questions you will likely find plenty of literature that discuss them. > > Be careful or you will fall down the rabbit hole that has swallowed literary > criticism, chasing meaningless but pretty ideas that go nowhere, lost in > endless reflections of ideas that seem like they must mean something but > can't be nailed down. This is the curse of language, many more things can be > said than have meaning. You don't start with a theory, you start with > specific questions and observations that need explaination. Theories provide > possible and hopefully testable explainations. The results suggested by > these theories, once validated as useful and predictive, can be the basis > for the next level of theories. > > Let me give a specific example. You don't ask for a theory of physics. > Physics is too general a thing to have one theory. On the other hand we have > a set of theories which describe various fields; gravitation, > electromagnetic, strong and weak forces. These theories are pretty mature > and usefully and predidictively explain the specific fields. These field > theories have a lot in common and now that they are well developed and > tested it is worthwhile looking for a unified field theory in which the > specific fields are merely special cases. Physicists have been hoping for > this one for 80 years. You try to build a general theory when the specific > theories are well understood. This does not describe the condition of > software engineering or even of so called "computer science." > > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > From bsass@freenet.edmonton.ab.ca Tue Aug 21 06:38:10 2001 From: bsass@freenet.edmonton.ab.ca (Bruce Sass) Date: Mon, 20 Aug 2001 23:38:10 -0600 (MDT) Subject: [Edu-sig] RE: [Tutor] Off topic musings In-Reply-To: <000b01c129fc$7e077580$097c2518@alngtn1.va.home.com> Message-ID: On Tue, 21 Aug 2001, Kevin Ollivier wrote: > I have to say I agree with Steve Morris here - I see programming and thus to <...> As do I. If you re-read the messages you will see that Alan G. wrote what you are both getting worked up about. I'm the guy who would head off into the philosophy section of the library... - Bruce From bsass@freenet.edmonton.ab.ca Tue Aug 21 06:49:17 2001 From: bsass@freenet.edmonton.ab.ca (Bruce Sass) Date: Mon, 20 Aug 2001 23:49:17 -0600 (MDT) Subject: [Edu-sig] RE: [Tutor] Off topic musings In-Reply-To: <000b01c129fc$7e077580$097c2518@alngtn1.va.home.com> Message-ID: I just realized that tutor@python.org was not in the CC, and I'm not subscribed to edu-sig... please forward any messages you think I should have responed to directly to me. Thanks - Bruce From alan.gauld@freenet.co.uk Mon Aug 20 19:58:16 2001 From: alan.gauld@freenet.co.uk (alan.gauld@freenet.co.uk) Date: Mon, 20 Aug 2001 19:58:16 +0100 Subject: [Edu-sig] RE: [Tutor] Off topic musings In-Reply-To: References: <5104D4DBC598D211B5FE0000F8FE7EB20E66BEB5@mbtlipnt02.btlabs.bt.co.uk> Message-ID: <06532379651321@mailth4.freenet.co.uk> On 20 Aug 01, at 12:24, Bruce Sass wrote: > > Yes, there are many books and papers on programming correctness but > > few on the nature of information. > > I think the Philosophy of Language section in the library would be the > place to start. Now thats an interesting idea. Lateral thinking indeed. One previous poster suggester I read Godel, Escher, Bach which is going in the same direction, but doesn't really quite get there either... > Unless I'm completely misunderstanding you, you are > interested in how information becomes data, gets manipulated, then > spit out as information again... Maybe. Really I'm just interested in what exactly a theoretical basis for software engineering would look like. The papes I was reading suggested that we may be reaching the point in CS research where we cannot progress further without an underlying theoretical base (like electrical theory underpins electronics which is in turn underpinned by atomic/molecular/ionic theory). But what is that theory? For instance we have Shannons stuff on the information content of bitstreams, WE have Date/Cobbs work on databases, we have Moore and Mealy's work on finite state automota and of course Boole's work on logic and binary arithmetic but there is little of anything unifying these things. Finding the unifying thread that ties together the various strands of CS in the same way electon theory pulls together everything in electronics is the big challenge in advancing CS. Alan G. From alan.gauld@freenet.co.uk Tue Aug 21 08:22:40 2001 From: alan.gauld@freenet.co.uk (alan.gauld@freenet.co.uk) Date: Tue, 21 Aug 2001 08:22:40 +0100 Subject: [Edu-sig] RE: [Tutor] Off topic musings In-Reply-To: <8010912471E0D41189930090278D4E48E154F7@SPAWN> Message-ID: <07300157854451@mailth4.freenet.co.uk> On 20 Aug 01, at 22:06, Morris, Steve wrote: > > > Maybe. Really I'm just interested in what exactly a theoretical > > > basis for software engineering would look like. > well try to make a general theory of communication which covers all possible > communication, speech, evocation, persuasion, poetry, art and expression. But the latter is being worked upon and indeed shares much of its basis with CS (Shannon and Moore both worked in comms) but whether such a goal can be achieved, at least they are trying. But in CS we seem to be bogged down in the study of techniques for programming rather than the fundamentals of understanding the nature of the information we manipulate. For example using Shannons work I can define the information content of a bit stream, by applying similar principles from Huffman I can give meaning to a character stream and McCabe(?) applied similar concepts(albeit via a bizarre mapping) to software complexity metrics. It would seem to indicate a basic commonality stretching from bitstreams through to program code. If we could start to understand the nature of that commonality we could start to address issues of program quality and correctness based on the impact on the underlying information transforms. Indeed we would also be able to start to specify systems in terms of the underlying information requirements. At present we are a long way away from this. (And no, I do not believe that data driven design ala JSD etc is directly related to this. Anymore than most of the work in AI does.) > software engineering would look like." Engineering doesn't have theories. > Science has theories; engineers apply these theories to solve specific > problems. This is true and I probably should be using CS instead of SE. The IEEE papers were headed SE so I guess that steered my wording. > Without specific questions > you will never have useful theories. When you narrow your self to specific > questions you will likely find plenty of literature that discuss them. And indeed that's been the direction of CS for the past 50 years or so. But the point the paper's authors were making was that we can no longer go on far in that direction without deriving a better understanding of the nature of information. > The results suggested by these theories, once validated as > useful and predictive, can be the basis for the next level of theories. And that seems to be the nub. We appear to have reached the point that we are not uncovering much that is new, we need a new set of theories to advance the art. > Physics is too general a thing to have one theory. I'm not sure I agree. All of physics ultimately comes down to studying the interaction of particles and the forces between such. Kind of like layer 1 in my model. At layer 2 things start to diverge into specialisms And by layer 3 we reach the differences between say optics and electronics - based on the same electromagnetic wavre theories but applied in different areas. > Physicists have been hoping for this one for 80 years. But again they are trying. All I'm asking is who is trying to understand information in the CS community? Thanks to everyone for the comments so far. It's interesting to see the different approaches taken. Alan G From smorris@cereva.com Tue Aug 21 15:26:16 2001 From: smorris@cereva.com (Morris, Steve) Date: Tue, 21 Aug 2001 10:26:16 -0400 Subject: [Edu-sig] RE: [Tutor] Off topic musings Message-ID: <8010912471E0D41189930090278D4E48E154FB@SPAWN> > On 20 Aug 01, at 22:06, Morris, Steve wrote: > > Maybe. Really I'm just interested in what exactly a > > theoretical basis for software engineering would look like. I think my problem with this discussion, and the cause of the different approaches, is that you ask your question in ambiguous terms. You ask for a "theory of everything" in the generic category of software engineering. Software engineering is not a science but a discipline, or perhaps a skill, or maybe just programming. The term 'software engineering" usually refers to the process of writing programs with the imputation that these programs match some standard; whether it be correctness, or matching the specs, or merely being useful. It is thus not suprising that we keep getting lost in the process and techniques of programming. That statement is almost a tautology. What else would a theory of "software engineering" address. I would like you to restate your query with a better idea of the specific questions you are trying to answer. I know what specific questions a "unified field theory" is trying to answer. What question are you trying to answer? From dscherer@vysics.com Tue Aug 21 17:30:06 2001 From: dscherer@vysics.com (David Scherer) Date: Tue, 21 Aug 2001 12:30:06 -0400 Subject: [Edu-sig] RE: [Tutor] Off topic musings In-Reply-To: <000b01c129fc$7e077580$097c2518@alngtn1.va.home.com> Message-ID: <000201c12a5e$89a922a0$9d01a8c0@RABBIT> > Also, since a computer is a tool that we have created, we > also control the "laws" which govern the design, operation > and use of this tool. As I see it, laws are generally > universal constants - a way to explain and predict the > behavior of natural forces. Laws mean nothing when you can > change them at will. We define the significance of bits and > bytes, we create the programming languages which we use to > create software, etc. We can also change those things, > meaning they aren't held constant. The only 'laws' I see as > applicable to computer science are those that it uses in > creating these tools - i.e. electricity and conductivity. There most certainly are universal laws that apply to computers, regardless of how they are created(*). For example, there are problems that cannot be solved in general by any computer program. Any computer, given unlimited memory, can simulate any other computer. There is even an absolute definition (Kolmogorov complexity) of the information content of any object, though it is not computable. If you accuse Computer Science of being insufficiently "unified", I can't argue with you, because I don't really know what that means. But there are most certainly universal laws of computing! Look here for one of the weirder consequences of this type of work, and probably the best paper title of all time: http://citeseer.nj.nec.com/hutter01fastest.html Dave (*) Obviously it cannot be shown mathematically that every possible computer obeys these laws, but there are many examples and no counterexamples, which is all that we can say for any scientific theory. Everything that we call a "computer" today most certainly does obey them. Anything based on logic gates and memory will obey them. Probably anything based on known laws of physics obeys them, since as far as I know the known laws of physics can be simulated (very slowly!) on a Turing machine. From alan.gauld@freenet.co.uk Tue Aug 21 18:28:15 2001 From: alan.gauld@freenet.co.uk (alan.gauld@freenet.co.uk) Date: Tue, 21 Aug 2001 18:28:15 +0100 Subject: [Edu-sig] RE: [Tutor] Off topic musings In-Reply-To: <8010912471E0D41189930090278D4E48E154FB@SPAWN> Message-ID: <17360250031353@mailth4.freenet.co.uk> On 21 Aug 01, at 10:26, Morris, Steve wrote: > > On 20 Aug 01, at 22:06, Morris, Steve wrote: > > > Maybe. Really I'm just interested in what exactly a > > > theoretical basis for software engineering would look like. > > I think my problem with this discussion, and the cause of the different > approaches, is that you ask your question in ambiguous terms. You ask for a > "theory of everything" in the generic category of software engineering. Sure but as Insaid in another pist thats because the SOTA papers I was reading were headed "Software Engineering". It is the generally used term, although I note that there does seem to be a trend to other names such as Infomatics. This is probably a good thing, where SE is a subset of Infomatics. > Software engineering is not a science but a discipline, or perhaps a skill, > or maybe just programming. With this I disagree however. The original concept of SE was to get away from that view, to industrialise the production of software, eventually to automate it in the sameway that other engineering disciplines automate production. When an electrical engineer takes a basic requirement and transforms it into a soecification which in turn is synthesised as a circuit the entire process is built on a fundamental understanding of the nature of the raw materials. The point made in the papers was that in SE we do not have that basic understanding. We do not really know the materials with which we work. > the process of writing programs with the imputation that these programs > match some standard; whether it be correctness, or matching the specs, or > merely being useful. That is one aspect but it neglects areas such as the study of softawre entropy, maintenance, performance and automatic production. Arguably these are related to software production, but they are much more than just writing programs. > What else would a theory of "software engineering" address. Indeed, thats why I probably should be saying CS or Infomatics. But the basic question remains valid. > I would like you to restate your query with a better idea of the specific > questions you are trying to answer. OK, I'll try again. Basically I was asking two questions: 1) Given the SOTA papers repeated insistence that to make further significant progress we need a better understanding of xxxx where xxxx is whatever fundamental subject matter underpins CS. I therefore ask, What would xxx look like so that we might study it? 2) My personal guess is that xxx is "information" and that one approach would be to model it ina layered fashion. Has anyone else done this? OIf so where can I get a reerence? Is that any clearer? Alan g From pdx4d@teleport.com Tue Aug 21 20:53:14 2001 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 21 Aug 2001 12:53:14 -0700 Subject: [Edu-sig] RE: [Tutor] Off topic musings In-Reply-To: <17360250031353@mailth4.freenet.co.uk> References: <8010912471E0D41189930090278D4E48E154FB@SPAWN> Message-ID: <4.2.0.58.20010821124835.00949270@pop3.norton.antivirus> At 06:28 PM 8/21/2001 +0100, you wrote: >The point made in the papers was that in SE we do not have that >basic understanding. We do not really know the materials with >which we work. The compiler is a mass-production module which you might say automates a lot of steps. But at the higher level, we have human ingenuity developing algorithms based on insights. I don't see any way to automate that entirely. The algorithm thread stretches back to pre-computer days and is therefore "platform independent" in a stronger sense. I'd start with algorithms, which is not entirely distinct from data structures; the two concepts are intimately interwoven, as are "game rules" and "game board" or "game apparatus". Kirby From alan.gauld@freenet.co.uk Tue Aug 21 21:49:09 2001 From: alan.gauld@freenet.co.uk (alan.gauld@freenet.co.uk) Date: Tue, 21 Aug 2001 21:49:09 +0100 Subject: [Edu-sig] RE: [Tutor] Off topic musings In-Reply-To: <17360250031353@mailth4.freenet.co.uk> References: <8010912471E0D41189930090278D4E48E154FB@SPAWN> Message-ID: <20563493757340@mailth4.freenet.co.uk> On 21 Aug 01, at 18:28, alan.gauld@freenet.co.uk wrote: > approach would be to model it ina layered fashion. Has anyone > else done this? OIf so where can I get a reerence? 3 typos in two lines - Doh! My new mail client has a spell checker, I really must get used to using it before I send. Sorry for that. Alan G From pdx4d@teleport.com Wed Aug 22 19:01:36 2001 From: pdx4d@teleport.com (Kirby Urner) Date: Wed, 22 Aug 2001 11:01:36 -0700 Subject: [Edu-sig] RE: [Tutor] Off topic musings In-Reply-To: <20563493757340@mailth4.freenet.co.uk> References: <17360250031353@mailth4.freenet.co.uk> <8010912471E0D41189930090278D4E48E154FB@SPAWN> Message-ID: <4.2.0.58.20010822105830.00c628c0@pop3.norton.antivirus> FYI, still doing my usual math-through-programming schtick w/ the math teachers on math-learn etc., with Python peaking through at every turn. Recent examples: http://www.mathforum.com/epigone/math-learn/vultingsheld http://www.mathforum.com/epigone/math-learn/kinblilrend Mostly redundant with earlier posts, but maybe interesting to those who haven't tuned in my standard stuff. I understand we'll be able to subclass modules soon, treating them pretty much like classes. That's interesting. I always look forward to new versions of Python. Kirby From rkr_ii@yahoo.com Fri Aug 24 16:59:12 2001 From: rkr_ii@yahoo.com (Robert Rickenbrode II) Date: Fri, 24 Aug 2001 11:59:12 -0400 Subject: [Edu-sig] Python Comp Sci course. Message-ID: <5.0.2.1.0.20010824112837.00a71cf0@pop.mail.yahoo.com> Hey folks, I"m gearing up to teach a Python-based computer science course. I just spent about a week chugging through the list archives (almost quit at the case-sensitivity debates ;) ). I have a few questions: 1. At several points in the past, people have offered to maintain or posted sites hosting lesson plans. Is there a site for these? Where is it? (For example, this one, http://www.ibiblio.org:420/Zope/Python given in December of last year does not work.) 2. I'm interested in doing some kind of iterative instruction using one project to illustrate a lot of the characteristics and functionality of the language. For example (after Lutz): - start with a simple, hard-coded dictionary of names/addresses (an addressbook). Print them out. - add a simple, text-based UI, allowing user to add, delete, edit entries (input/output/UI) - complexify the data stored and move to file based storage (file io, data stores) - add ability to sort (without built-in methods, to learn the algorithms) - add ability to find (more algorithms) - then, move to a GUI? and then.... (I've got lots of ideas - net-based sharing, file input/output, move to a web-based CGI system, etc - just wondering what people think. Also, would this excite students?) 3. I'd like to include a significant amount of history in the class. Can anyone recommend texts related the two main branches of computer science I'd like the talk about: the history of "calculation", including ancient devices like the abacus, quipu, slide-rule (grin) and the theory of numbers/counter/arithmetic, and the history of the computer, focusing on the 20th century? Thoughts, suggestions, comments, references? 4. I'm wondering what people have done for large-scale projects... I'm thinking along these lines: - a primitive sketch/draw program (nice GUI and object lessons here) - a CGI system for the school (alumni database) - Tic-Tac-Toe (with AI), of course - other games (NIM, etc.) - local school chat program Of course I will let the kids make suggestions also, I'm just wondering where people have gone with this. Thanks much, Rob Robert K. Rickenbrode II rkr_ii@yahoo.com _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From mats@laplaza.org Fri Aug 24 19:22:24 2001 From: mats@laplaza.org (Mats Wichmann) Date: Fri, 24 Aug 2001 12:22:24 -0600 Subject: [Edu-sig] Python Comp Sci course. In-Reply-To: <5.0.2.1.0.20010824112837.00a71cf0@pop.mail.yahoo.com> Message-ID: <5.1.0.14.1.20010824121454.01fd67e8@204.151.72.2> At 11:59 AM 8/24/2001 -0400, Robert Rickenbrode II wrote: >Hey folks, I"m gearing up to teach a Python-based computer science course. >I just spent about a week chugging through the list archives (almost quit >at the case-sensitivity debates ;) ). I have a few questions: > >1. At several points in the past, people have offered to maintain or posted >sites hosting lesson plans. Is there a site for these? Where is it? (For >example, this one, http://www.ibiblio.org:420/Zope/Python given in December >of last year does not work.) > >2. I'm interested in doing some kind of iterative instruction using one >project to illustrate a lot of the characteristics and functionality of the >language. For example (after Lutz): >- start with a simple, hard-coded dictionary of names/addresses (an >addressbook). Print them out. >- add a simple, text-based UI, allowing user to add, delete, edit entries >(input/output/UI) >- complexify the data stored and move to file based storage (file io, data >stores) >- add ability to sort (without built-in methods, to learn the algorithms) >- add ability to find (more algorithms) >- then, move to a GUI? >and then.... >(I've got lots of ideas - net-based sharing, file input/output, move to a >web-based CGI system, etc - just wondering what people think. Also, would >this excite students?) I've done something like this with an "employee database" (very minimal): hardcoded dictionary, add text input and a pickle (with a separate script to read the data to "prove" the object really is restored from the pickle), turn it into a class to give named storage to the fields, add a gui, and eventually push the data to a a mysql database to show that if the modules were "coded right" the interfaces used by the gui and text update/retreive code do not have to change, just the code to access the backend store. I think this is okay, and students like it, but I'd caution to not have it be your /only/ set of examples. It seems to work for me if you occasionally say "okay, now let's come back to our XXX" but it's too much if the single "theme" is the only thing you're showing. My two cents' worth. Mats From dave@whatever.nu Fri Aug 24 19:42:19 2001 From: dave@whatever.nu (David Pettersson) Date: 24 Aug 2001 20:42:19 +0200 Subject: [Edu-sig] Simple frame buffer module Message-ID: <998678539.3157.15.camel@teacup> Hi, I'd like to announce the simple frame buffer module that I wacked together after being fed up with having to create a GUI every time I wanted to illustrate something simple in Python (such as the iterative improvement of some problem). A short sample: import fb # import module f = fb.FrameBuffer() # create an instance f.open(200, 200, "demo") # open a window named "demo" for i in range(10, 190): # simple loop f.fg = (i, i, i) # set fg colour f.plot(i, i) # plot f.flip() # flip buffers raw_input('enter to quit') # wait for keypress f.close() # close window Could be useful if you want students to be able to create simple graphics without having to teach them a GUI. The extension uses SDL to manage the graphics. The extension is available at http://dave.whatever.nu/python/fb/ Comments, suggestions and bug reports are all very welcome :). Sincerely, -- David Pettersson dave@whatever.nu From agauld@crosswinds.net Fri Aug 24 22:15:00 2001 From: agauld@crosswinds.net (agauld@crosswinds.net) Date: Fri, 24 Aug 2001 22:15:00 +0100 Subject: [Edu-sig] Simple frame buffer module In-Reply-To: <998678539.3157.15.camel@teacup> Message-ID: <21225940663365@mailth4.freenet.co.uk> On 24 Aug 01, at 20:42, David Pettersson wrote: > I'd like to announce the simple frame buffer module Looks like fun, I'll take a looksee. > The extension uses SDL to > manage the graphics. This is the second time I've seen SDL mentioned in the context of graphics this week.... To me SDL stands for Specification and Design Language - a truly great design notation but not obviously graphics oriented... I assume there's another and while a web search would no doubt reveal all, I'm feeling lazy. So whats SDL in a graphics context? Alan G. From delza@alliances.org Fri Aug 24 22:36:57 2001 From: delza@alliances.org (Dethe Elza) Date: Fri, 24 Aug 2001 14:36:57 -0700 Subject: [Edu-sig] Simple frame buffer module References: <21225940663365@mailth4.freenet.co.uk> Message-ID: <3B86C8F9.9010400@alliances.org> SDL is the Simple DirectMedia Layer http://www.libsdl.org/ Simple DirectMedia Layer is a cross-platform multimedia library designed to provide fast access to the graphics framebuffer and audio device. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of "Civilization: Call To Power." Simple DirectMedia Layer supports Linux, Win32, BeOS, MacOS, Solaris, IRIX, and FreeBSD. SDL is written in C, but works with C++ natively, and has bindings to several other languages, including Ada, Eiffel, ML, Perl, PHP, Python, and Ruby. Pygame is probably the best known python project built on top of SDL: http://pygame.seul.org/ HTH --Dethe -- Dethe Elza (delza@burningtiger.com) Chief Mad Scientist Burning Tiger Technologies (http://burningtiger.com) Living Code Weblog (http://livingcode.ca) From urnerk@qwest.net Mon Aug 27 04:16:53 2001 From: urnerk@qwest.net (Kirby Urner) Date: Sun, 26 Aug 2001 23:16:53 -0400 Subject: [Edu-sig] Introspective Python Message-ID: <01082623165300.14669@ktu> Here's some Python demonstrating introspection: the function ls takes and object and spits out the keys from its class dictionary, containing a list of methods for that object. Below: list and string objects spill their guts: >>> def ls(obj): ... return getattr(obj.__class__,'__dict__').keys() ... >>> ls([]) ['sort', '__ne__', '__getattr__', '__getslice__', '__delitem__', '__mul__', '__str__', '__getitem__', 'pop', '__class__', '__setitem__', '__iadd__', '__add__', '__gt__', '__rmul__', '__lt__', '__ge__', '__eq__', 'append', '__imul__', 'extend', 'insert', '__setattr__', 'reverse', '__contains__', 'index', '__setslice__', 'count', 'remove', '__delattr__', '__le__', '__init__', '__hash__', '__new__', '__len__', '__repr__'] >>> ls('s') ['upper', '__getslice__', '__ne__', 'lstrip', '__str__', 'replace', 'isdigit', 'endswith', 'splitlines', 'rfind', 'strip', '__rmul__', '__lt__', 'ljust', 'find', '__init__', 'index', '__setattr__', '__new__', 'isalnum', '__contains__', 'rindex', '__eq__', '__class__', '__getattr__', 'decode', 'isalpha', 'split', 'rstrip', 'encode', 'translate', 'istitle', '__len__', '__mul__', 'startswith', '__getitem__', 'rjust', 'swapcase', 'islower', '__add__', '__gt__', 'capitalize', 'count', 'lower', 'join', 'center', 'title', 'expandtabs', 'isspace', '__delattr__', '__le__', '__repr__', '__hash__', 'isupper', '__ge__'] Kirby From urnerk@qwest.net Mon Aug 27 04:31:36 2001 From: urnerk@qwest.net (Kirby Urner) Date: Sun, 26 Aug 2001 23:31:36 -0400 Subject: [Edu-sig] More introspection w/ Python 2.2a2 Message-ID: <01082623313601.14669@ktu> More introspection in Python 2.2a2: >>> t = type(3) >>> t t is a metaclass, the type of 3, i.e. an integer. You can create a new instance of an integer by calling the integer type: >>> t() 0 >>> t(1) 1 These instances are type integer: >>> type(t(1)) But the type object that gets returned as is an instance of type, a metaclass: >>> t.__class__ Using the introspection function from the last post: >>> ls(t) ['__module__', '__bases__', '__itemsize__', '__dynamic__', '__hash__', '__str__', '__weakrefoffset__', '__dict__', '__name__', '__cmp__', '__init__', '__setattr__', '__basicsize__', '__new__', '__base__', '__flags__', '__class__', '__getattr__', '__mro__', '__delattr__', 'mro', '__repr__', '__dictoffset__', '__call__', '__defined__', '__doc__'] These are the methods of the type metaclass -- nothing to do with integers per se. >>> t.__module__ '__builtin__' The type metaclass is itself a subclass of a yet more generic type object. >>> t.__bases__ (,) >>> z = t.__bases__[0] >>> ls(z) ['__module__', '__bases__', '__itemsize__', '__dynamic__', '__hash__', '__str__', '__weakrefoffset__', '__dict__', '__name__', '__cmp__', '__init__', '__setattr__', '__basicsize__', '__new__', '__base__', '__flags__', '__class__', '__getattr__', '__mro__', '__delattr__', 'mro', '__repr__', '__dictoffset__', '__call__', '__defined__', '__doc__'] Seems to be the same basic animal. What are __flags__ ? Hell if I know: >>> t.__flags__ 4603 >>> t.__new__ I've been hearing about this __new__ thingy. Anyone want to elucidate? All ears. Kirby From urnerk@qwest.net Mon Aug 27 04:41:09 2001 From: urnerk@qwest.net (Kirby Urner) Date: Sun, 26 Aug 2001 23:41:09 -0400 Subject: [Edu-sig] Class methods in 2.2a2 Message-ID: <01082623410902.14669@ktu> Self-less classes: it's now possible to define methods with no self argument. The methods may be invoked even with no instance of the class being created: >>> class foo: ... def add(a,b): ... return a+b ... add = staticmethod(add) ... >>> foo.add(3,4) 7 >>> g = foo() >>> g.add(1,2) 3 Yes, I've been reading the PEPs -- obviously. E.g.: http://python.sourceforge.net/peps/pep-0253.html Kirby From agauld@crosswinds.net Mon Aug 27 12:00:30 2001 From: agauld@crosswinds.net (agauld@crosswinds.net) Date: Mon, 27 Aug 2001 12:00:30 +0100 Subject: [Edu-sig] Class methods in 2.2a2 In-Reply-To: <01082623410902.14669@ktu> Message-ID: <11075943741973@mailth4.freenet.co.uk> On 26 Aug 01, at 23:41, Kirby Urner wrote: > Self-less classes: it's now possible to define methods with no self > argument. The methods may be invoked even with no instance of > the class being created: Ooh, at last. A change to Python that I like ;-) Alan G. From cmeyers@guardnet.com Mon Aug 27 17:37:33 2001 From: cmeyers@guardnet.com (Chris Meyers) Date: Mon, 27 Aug 2001 08:37:33 -0800 Subject: [Edu-sig] Simple frame buffer module Message-ID: Hi Dave, I played around with this a bit over the weekend. I'd like to use it in my class this fall. We're (unfortunately) on a win32 setup but I got it going with a couple of hacks. If you don't already have one, I could clean it up and send you a "cfb" binary download for windows folks that don't have a C compiler or want to mess with it. One little thing. The window does not repaint when moved or uncovered. Is it possible to remedy this easily? I don't know anything about SDL programming, although this is helping me to start learning. Thanks Chris Meyers BTW it took me a bit to figure out what in the world you were doing with the exclusive OR stuff in your line generation code. When I did it took me back to the machine code daze. 08/24/2001 9:42:19 PM, David Pettersson wrote: >Hi, > >I'd like to announce the simple frame buffer module that I wacked >together after being fed up with having to create a GUI every time I >wanted to illustrate something simple in Python (such as the iterative >improvement of some problem). A short sample: > > import fb # import module > f = fb.FrameBuffer() # create an instance > f.open(200, 200, "demo") # open a window named "demo" > for i in range(10, 190): # simple loop > f.fg = (i, i, i) # set fg colour > f.plot(i, i) # plot > f.flip() # flip buffers > raw_input('enter to quit') # wait for keypress > f.close() # close window > >Could be useful if you want students to be able to create simple >graphics without having to teach them a GUI. The extension uses SDL to >manage the graphics. The extension is available at > > http://dave.whatever.nu/python/fb/ > >Comments, suggestions and bug reports are all very welcome :). > >Sincerely, >-- >David Pettersson >dave@whatever.nu > >_______________________________________________ >Edu-sig mailing list >Edu-sig@python.org >http://mail.python.org/mailman/listinfo/edu-sig > From delza@alliances.org Mon Aug 27 19:54:31 2001 From: delza@alliances.org (Dethe Elza) Date: Mon, 27 Aug 2001 11:54:31 -0700 Subject: [Edu-sig] Re: [Pythonmac-SIG] Re: Number format in IDE References: Message-ID: <3B8A9767.2040803@alliances.org> There is much being made of the problems with computing using binary floating values, which is the default with all computer languages that I'm aware of. One of the nice things about python is that it makes it relatively easy to change the default. For instance, you could use use decimal division, which wouldn't help with cases like 1 / 3 = 0.33333..., but would allow 0.1 + 0.1 + 0.1 = 0.3 to be expressed precisely. Decimal math works through the problem just like person would on paper (or in their head), not using any of the high-speed special-purpose tools of the modern computer (floating point units), but it works and gives the answer you'd expect. The other solution, and one which keeps getting proposed for python and deferred, is rational math, where 1/3 is expressed as 1/3, not as 0.3333... (or as 0). Unfortunately, since neither of these are built-in, you either need to import a library and use them explicity, or do some fancy footwork with python at deeper levels than many of us (myself included) feel comfortable with. But if there's a real need for this, maybe we should put our heads together and figure out the best way. My opinion is that using floating point and rounding is a hack (even if calculators do it) and we should find a better solution. Of course, while these options are great for using python as a calculator, they would suck if used for a ray-tracer (you wouldn't want to use python long ints for such a beast, either). Thankfully, python gives us the flexibility to use the right tool for the job, if only we can determine what the *right* tool is. -- Dethe Elza (delza@burningtiger.com) Chief Mad Scientist Burning Tiger Technologies (http://burningtiger.com) Living Code Weblog (http://livingcode.ca) From dave@whatever.nu Mon Aug 27 21:27:08 2001 From: dave@whatever.nu (David Pettersson) Date: 27 Aug 2001 22:27:08 +0200 Subject: [Edu-sig] Simple frame buffer module In-Reply-To: References: Message-ID: <998943951.10884.36.camel@teacup> On Mon, 2001-08-27 at 18:37, Chris Meyers wrote: Hi! > I played around with this a bit over the weekend. I'd like to use > it in my class this fall. That sounds great :). I'd like to get some feedback. > have one, I could clean it up and send you a "cfb" binary download That would be great. I'm going to go over the package completely (I have no idea what I was thinking at the time - there are numerous errors throughout the entire package and some more documentation wouldn't hurt. I'll clean this up right away and release a 1.1 in a couple of hours. I might break some code, so beware. > One little thing. The window does not repaint when moved or > uncovered. Is it possible to remedy this easily? Well, I can't reproduce this here (I'm running Linux and Xfree86 3.3.6) - it sounds like a Win32 issue. Can anyone shed any light on this? By the way, thanks to you all for the great response :). Sincerely, -- David Pettersson dave@whatever.nu From altis@semi-retired.com Mon Aug 27 22:38:52 2001 From: altis@semi-retired.com (Kevin Altis) Date: Mon, 27 Aug 2001 14:38:52 -0700 Subject: [Edu-sig] Re: Simple frame buffer module Message-ID: FYI, PythonCard contains a fairly elaborate turtle graphics library and set of samples that also happen to do plot, lineTo, etc. There are various samples plotting chaotic functions, coordinate grids, and fractals. There is even a generic plot sample that is a bit strange, but can plot any generic function since it uses eval to do its work. http://pythoncard.sourceforge.net/ Pictures of the turtle(s) (you can have any number of turtles you want) in action are at: http://pythoncard.sourceforge.net/samples2.html You can drive the turtle, do plotting, etc. from the shell or write a script. samples\turtle\test_turtle.py is the main program to run if you download PythonCard and want to try it out. PythonCard requires wxPython to run. The one thing it is really missing is an offscreen frame buffer, I just haven't had time to do it. Consequently, when you cover up the window, you lose the current drawing, but I'll fix that in the future unless somebody beats me to it. ka --- Kevin Altis altis@semi-retired.com From pdx4d@teleport.com Mon Aug 27 23:07:45 2001 From: pdx4d@teleport.com (Kirby Urner) Date: Mon, 27 Aug 2001 15:07:45 -0700 Subject: [Edu-sig] Re: [Pythonmac-SIG] Re: Number format in IDE In-Reply-To: <3B8A9767.2040803@alliances.org> References: Message-ID: <4.2.0.58.20010827150617.00c86de0@pop3.norton.antivirus> >course, while these options are great for using python as a calculator, >they would suck if used for a ray-tracer (you wouldn't want to use python >long ints for such a beast, either). Not sure I follow. A ray tracer doesn't need infinite precision. Floating point ops do OK, no? After you get well below the threshold of screen and/or print resolution, who cares about more digits? Kirby From wilson@visi.com Tue Aug 28 02:37:17 2001 From: wilson@visi.com (Timothy Wilson) Date: Mon, 27 Aug 2001 20:37:17 -0500 (CDT) Subject: [Edu-sig] Python Comp Sci course. In-Reply-To: <5.0.2.1.0.20010824112837.00a71cf0@pop.mail.yahoo.com> Message-ID: On Fri, 24 Aug 2001, Robert Rickenbrode II wrote: > Thoughts, suggestions, comments, references? Hi Robert, I've just put together my latest version of the "Python Resources" CD that I plan to hand out to my students next week. It contains a mirror of python.org, Alan Gauld's tutorial, and the Python software for Linux, Mac, and Windows. I've also included some other Python apps like PySol, VPython, Pygame, and Zope. It also has a mirror of the "How To Think Like a Computer Scientist" Web pages. I plan to use this as my "textbook" for the year. Please feel free to download an iso of the CD. It's a 230 MB download and can be had via ftp from lists.isd197.org. Look for 'pyresources.iso' in the mail ftp directory. Good luck with your course. I'm getting excited to begin teaching mine. (I'm also a first-time C.S./Python teacher.) I'm also interested in developing a database of lesson plans, project ideas, etc. I be happy to discuss any ideas for how to make it happen. -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.org | http://www.zope.com W. St. Paul, MN | | http://slashdot.org wilson@visi.com | | http://linux.com From Jonathan Pennington Tue Aug 28 03:23:57 2001 From: Jonathan Pennington (Jonathan Pennington) Date: Mon, 27 Aug 2001 22:23:57 -0400 Subject: [Edu-sig] Python Comp Sci course. In-Reply-To: ; from wilson@visi.com on Mon, Aug 27, 2001 at 08:37:17PM -0500 References: <5.0.2.1.0.20010824112837.00a71cf0@pop.mail.yahoo.com> Message-ID: <20010827222357.B2215@coastalgeology.org> * Timothy Wilson [010827 22:16]: > Please feel free to download an iso of the CD. It's a 230 MB download and > can be had via ftp from lists.isd197.org. Look for 'pyresources.iso' in the > mail ftp directory. Tim, that's wonderful! I'm a second year Python teacher and have been putting this off. I'm glad to see my laziness paid off :-) Thanks so much. -J -- Jonathan Pennington | john@coastalgeology.org "It's hard to take life too seriously when you realize yours is a joke." -me From wilson@visi.com Tue Aug 28 14:56:17 2001 From: wilson@visi.com (Timothy Wilson) Date: Tue, 28 Aug 2001 08:56:17 -0500 (CDT) Subject: [Edu-sig] Teaching python Message-ID: Hi everyone, I keep hearing about more teachers who, like myself, are using Python to teach programming in high schools around the U.S. Perhaps it would be nice to have a page at python.org in the edu-sig section listing the schools and teachers who are using it. Of course I have no idea how we'd find everyone, and perhaps finding a small number of teachers listed on the page would be a disincentive for teachers who are just discovering Python. Any thoughts? -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.org | http://www.zope.com W. St. Paul, MN | | http://slashdot.org wilson@visi.com | | http://linux.com From jeff@elkner.net Tue Aug 28 16:06:17 2001 From: jeff@elkner.net (Jeffrey Elkner) Date: 28 Aug 2001 11:06:17 -0400 Subject: [Edu-sig] Teaching python In-Reply-To: References: Message-ID: <999011198.1679.35.camel@mdeicaza> I think Tim has an excellent idea here. Actually, a web page and a new interest group / mailing list would be even better. There is enough interest developing that the level of traffic will warrent a new group/list. jeff On Tue, 2001-08-28 at 09:56, Timothy Wilson wrote: > Hi everyone, > > I keep hearing about more teachers who, like myself, are using Python to > teach programming in high schools around the U.S. Perhaps it would be nice > to have a page at python.org in the edu-sig section listing the schools and > teachers who are using it. Of course I have no idea how we'd find everyone, > and perhaps finding a small number of teachers listed on the page would be a > disincentive for teachers who are just discovering Python. > > Any thoughts? > > -Tim From rob@jam.rr.com Tue Aug 28 16:36:10 2001 From: rob@jam.rr.com (Rob Andrews) Date: Tue, 28 Aug 2001 10:36:10 -0500 Subject: [Edu-sig] Teaching python References: Message-ID: <3B8BBA6A.1010007@jam.rr.com> Timothy Wilson wrote: > Hi everyone, > > I keep hearing about more teachers who, like myself, are using > Python to teach programming in high schools around the U.S. Perhaps > it would be nice to have a page at python.org in the edu-sig > section listing the schools and teachers who are using it. Of > course I have no idea how we'd find everyone, and perhaps finding a > small number of teachers listed on the page would be a disincentive > for teachers who are just discovering Python. > > Any thoughts? > > -Tim A fine idea. I don't think people would be discouraged by being among the first programs listed. When the Python Tutor list started up Useless Python at the first of the year, we had four or five source files on a single page thrown together with Netscape Composer. I have the pleasure (Yes, I still enjoy it!) of maintaining the site, so I have gotten to see an endless supply of enthusiasm from people learning Python and from their tutors, teachers and heroes. I extend the same offer I made to the Tutor list several months ago. If you'd like to start the list, I'll gladly host it. I've been thinking of making this suggestion for a while now. Rob -- A {} is a terrible thing to waste. Useless Python! http://www.lowerstandard.com/python From delza@alliances.org Tue Aug 28 16:54:51 2001 From: delza@alliances.org (Dethe Elza) Date: Tue, 28 Aug 2001 08:54:51 -0700 Subject: [Edu-sig] Teaching python References: Message-ID: <3B8BBECB.2000203@alliances.org> > I keep hearing about more teachers who, like myself, are using Python to > teach programming in high schools around the U.S. Perhaps it would be nice > to have a page at python.org in the edu-sig section listing the schools and > teachers who are using it. Of course I have no idea how we'd find everyone, > and perhaps finding a small number of teachers listed on the page would be a > disincentive for teachers who are just discovering Python. I like this idea, especially if it can double as a lesson-plan repository. I think setting up a Wiki or a Zope where many people can participate in maintaining it might be more useful that a page at python.org (those don't seem to change very often). What do y'all think? Oh, and let's not be exclusive to the US. Some of us in the free world teach python too %-) --Dethe -- Dethe Elza (delza@burningtiger.com) Chief Mad Scientist Burning Tiger Technologies (http://burningtiger.com) Living Code Weblog (http://livingcode.ca) From jeff@elkner.net Tue Aug 28 17:10:29 2001 From: jeff@elkner.net (Jeffrey Elkner) Date: 28 Aug 2001 12:10:29 -0400 Subject: [Edu-sig] Teaching python In-Reply-To: <3B8BBECB.2000203@alliances.org> References: <3B8BBECB.2000203@alliances.org> Message-ID: <999015049.1698.70.camel@mdeicaza> The wonderful folks at ibiblio.org have already set up Zope for the Open Book Project. I was already thinking about setting up a Wiki there for just the purpose you describe. Lex Berezhny will be maintaining that site when he gets back from the Ukraine. I'll keep you all up to date on its progress, and welcome suggestions as to how best to set it up. Thanks! jeff elkner yorktown high school arlington, va On Tue, 2001-08-28 at 11:54, Dethe Elza wrote: > > I keep hearing about more teachers who, like myself, are using Python to > > teach programming in high schools around the U.S. Perhaps it would be nice > > to have a page at python.org in the edu-sig section listing the schools and > > teachers who are using it. Of course I have no idea how we'd find everyone, > > and perhaps finding a small number of teachers listed on the page would be a > > disincentive for teachers who are just discovering Python. > > I like this idea, especially if it can double as a lesson-plan > repository. I think setting up a Wiki or a Zope where many people can > participate in maintaining it might be more useful that a page at > python.org (those don't seem to change very often). > > What do y'all think? Oh, and let's not be exclusive to the US. Some of > us in the free world teach python too %-) > > --Dethe > From pdx4d@teleport.com Tue Aug 28 17:12:27 2001 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 28 Aug 2001 09:12:27 -0700 Subject: [Edu-sig] Teaching python In-Reply-To: <999011198.1679.35.camel@mdeicaza> References: Message-ID: <4.2.0.58.20010828091013.00941e00@pop3.norton.antivirus> At 11:06 AM 8/28/2001 -0400, Jeffrey Elkner wrote: >I think Tim has an excellent idea here. Actually, a web page and a new >interest group / mailing list would be even better. There is >enough interest developing that the level of traffic will warrent a >new group/list. > >jeff Seems a new official SIG type list would best be spawned if/when traffic *did* get to that level and was a lot of it not clearly edu-sig related. Seems for now that volume is rather low, and the proposed discussion branch is what edu-sig is supposed to be about, in part, no? But maybe this wasn't a proposal for a new SIG. Could be a Yahoo group or something. Kirby From jeff@elkner.net Tue Aug 28 17:38:44 2001 From: jeff@elkner.net (Jeffrey Elkner) Date: 28 Aug 2001 12:38:44 -0400 Subject: [Edu-sig] Teaching python In-Reply-To: <4.2.0.58.20010828091013.00941e00@pop3.norton.antivirus> References: <4.2.0.58.20010828091013.00941e00@pop3.norton.antivirus> Message-ID: <999016744.1698.98.camel@mdeicaza> Actually, Kirby, I was calling for the creation of a new SIG. There are two very different kinds of discussions that can fall under the heading of an Educational Special Interest Group. One is the kind of more theoretical discussions that generally take place here, and the other concerns the more concrete, practical issues of classroom teachers about finding and using instructional materials and planning lessons. While there are undoubtedly many folks who would want to be on both lists, there are many others who might not. As someone working on an introductory textbook using Python, I get mail from people interested in the book who write me and ask where they can go to get more resources. There are enough of these inquiries coming in now that I think it would be appropriate to create a new list to help this emerging community of teachers using Python to grow. jeff On Tue, 2001-08-28 at 12:12, Kirby Urner wrote: > At 11:06 AM 8/28/2001 -0400, Jeffrey Elkner wrote: > >I think Tim has an excellent idea here. Actually, a web page and a new > >interest group / mailing list would be even better. There is > >enough interest developing that the level of traffic will warrent a > >new group/list. > > > >jeff > > Seems a new official SIG type list would best be spawned > if/when traffic *did* get to that level and was a lot of > it not clearly edu-sig related. Seems for now that volume > is rather low, and the proposed discussion branch is what > edu-sig is supposed to be about, in part, no? But maybe > this wasn't a proposal for a new SIG. Could be a Yahoo > group or something. > > Kirby From wilson@visi.com Tue Aug 28 17:52:18 2001 From: wilson@visi.com (Timothy Wilson) Date: Tue, 28 Aug 2001 11:52:18 -0500 (CDT) Subject: [Edu-sig] Teaching python In-Reply-To: <999015049.1698.70.camel@mdeicaza> Message-ID: On 28 Aug 2001, Jeffrey Elkner wrote: > The wonderful folks at ibiblio.org have already set up Zope for the Open > Book Project. I was already thinking about setting up a Wiki there for > just the purpose you describe. Lex Berezhny will be maintaining that > site when he gets back from the Ukraine. I'll keep you all up to date > on its progress, and welcome suggestions as to how best to set it up. If they'd be willing, I hereby nominate ibiblio for hosting the list of schools teaching Python and the future lesson plan repository. :-) Using Zope will make the project much easier to maintain and would allow for easy contributions from others who aren't responsible for the site directly. -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.org | http://www.zope.com W. St. Paul, MN | | http://slashdot.org wilson@visi.com | | http://linux.com From wilson@visi.com Tue Aug 28 17:53:09 2001 From: wilson@visi.com (Timothy Wilson) Date: Tue, 28 Aug 2001 11:53:09 -0500 (CDT) Subject: [Edu-sig] Teaching python In-Reply-To: <3B8BBECB.2000203@alliances.org> Message-ID: On Tue, 28 Aug 2001, Dethe Elza wrote: > What do y'all think? Oh, and let's not be exclusive to the US. Some of > us in the free world teach python too %-) Indeed! Anything to foster cooperation is a plus. -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.org | http://www.zope.com W. St. Paul, MN | | http://slashdot.org wilson@visi.com | | http://linux.com From pdx4d@teleport.com Tue Aug 28 17:57:54 2001 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 28 Aug 2001 09:57:54 -0700 Subject: [Edu-sig] More useless Python (CS/number theory) In-Reply-To: References: <5.0.2.1.0.20010824112837.00a71cf0@pop.mail.yahoo.com> Message-ID: <4.2.0.58.20010828091330.00bcbf00@pop3.norton.antivirus> Here's a version of the Extended Euclidean Algorithm, with related inverse and Chinese Remainder Theorem functions. Very old hat stuff in CS, but that's why important. Note I use the new //, which is available in 2.2a2 w/o import from __future__. The EEA returns a 3-tuple, the 0th element being the gcd(a,b), the next two being s,t such that gcd(a,b) = s*a + t*b, i.e. two integers which bring the initial a,b within the gcd of one another. Example: >>> eea(17,25) # gcd(a,b) = 1 [1, 3, -2] >>> 3*17 - 2*25 # s = 3, t = -2 1 >>> eea(29834,8282) # gcd(a,b) = 2 [2, -88, 317] >>> -88*29834 + 317*8282 # s = -88, t = 317 2 With EEA, you can also find the inverse of x mod n, provided gcd(x,n)=1. The inverse is that number which, multiplying x, gives a remainder of 1 when divided by n. Example: find x such that (x * 7) mod 4 = 1. Computing: >>> inverse(7,4) 3 i.e. (3*7) mod 4 = 21 mod 4 = integer remainder of 21/4 = 1. The Chinese Remainder Theorem states that if I give you a smattering of divisors, all coprime to each other, and tell you what the remainders for each of them is, then you can tell me a number which meets my specifications. Example: Your divisors are 7,11 and 15. The respective remainders are 2, 3 and 0. What's a number that works? Computing: >>> crt([7,11,15],[2,3,0]) 135 Check: >>> 135 % 7 2 >>> 135 % 11 3 >>> 135 % 15 0 Works. The also EEA comes up in CS in connection with RSA. You need it to find secret pair d, matched with e, such that (d*e) mod (p-1)(q-1) = 1, where p,q are the two humongous primes used to generate p*q = n, the public key. There's a more generalized form of the CRT which allows the divisors to not necessarily be coprime to start with (but with another stipulation about the remainders in that case). See Knuth, Art of Computer Programming, Vol 3, pg. 292. Tweaking the code below to accommodate this case might be an exercise. HINT: you'd probably want an lcm function. Kirby ===================== Here's the code: from operator import mod def eea(a,b): """Extended Euclidean Algorithm for GCD""" v1 = [a,1,0] v2 = [b,0,1] while v2[0]<>0: p = v1[0]//v2[0] # floor division v2, v1 = map(sub,v1,[p*vi for vi in v2]), v2 return v1 def inverse(m,k): """ Return b such that b*m mod k = 1, or 0 if no solution """ v = eea(m,k) return (v[0]==1)*(v[1] % k) def crt(ms,as): """ Chinese Remainder Theorem: ms = list of pairwise relatively prime integers as = remainders when x is divided by ms (ai is 'each in as', mi 'each in ms') The solution for x modulo M (M = product of ms) will be: x = a1*M1*y1 + a2*M2*y2 + ... + ar*Mr*yr (mod M), where Mi = M/mi and yi = (Mi)^-1 (mod mi) for 1 <= i <= r. """ M = reduce(mul,ms) # multiply ms together Ms = [M/mi for mi in ms] # list of all M/mi ys = [inverse(Mi, mi) for Mi,mi in zip(Ms,ms)] # uses inverse,eea return reduce(add,[ai*Mi*yi for ai,Mi,yi in zip(as,Ms,ys)]) % M From pdx4d@teleport.com Tue Aug 28 18:03:49 2001 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 28 Aug 2001 10:03:49 -0700 Subject: [Edu-sig] Teaching python In-Reply-To: <999016744.1698.98.camel@mdeicaza> References: <4.2.0.58.20010828091013.00941e00@pop3.norton.antivirus> <4.2.0.58.20010828091013.00941e00@pop3.norton.antivirus> Message-ID: <4.2.0.58.20010828095858.00d39d90@pop3.norton.antivirus> At 12:38 PM 8/28/2001 -0400, Jeffrey Elkner wrote: >Actually, Kirby, I was calling for the creation of a new SIG. OK, I see. However, it could be that we're seeing a ground swell of teachers wanting to use Python and so the character of edu-sig will naturally morph into this new more "in the classroom" nuts and bolts chapter. The more theoretical wheel-spinning phase might become more muted and in-the-background, is what filled the list hitherto simply because teachers were testing the waters and wondering if Python was the way to go. Now they know that it is. edu-sig might getting a different kind of traffic as a result. That'd be fine with me BTW. Why not see the kind of traffic you mention build up to a higher level here on edu-sig, before forking off to a whole other SIG? So far, I've not seen any big volume -- lots of folks off for the summer etc. Kirby From delza@alliances.org Tue Aug 28 18:44:01 2001 From: delza@alliances.org (Dethe Elza) Date: Tue, 28 Aug 2001 10:44:01 -0700 Subject: [Edu-sig] Teaching python References: Message-ID: <3B8BD861.2010500@alliances.org> > If they'd be willing, I hereby nominate ibiblio for hosting the list of > schools teaching Python and the future lesson plan repository. :-) Using > Zope will make the project much easier to maintain and would allow for easy > contributions from others who aren't responsible for the site directly. Hear hear! I love the sound of a decision being made. -- Dethe Elza (delza@burningtiger.com) Chief Mad Scientist Burning Tiger Technologies (http://burningtiger.com) Living Code Weblog (http://livingcode.ca) From pdx4d@teleport.com Tue Aug 28 23:29:36 2001 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 28 Aug 2001 15:29:36 -0700 Subject: [Edu-sig] Teaching python In-Reply-To: <999030103.2294.32.camel@mdeicaza> References: <4.2.0.58.20010828095858.00d39d90@pop3.norton.antivirus> <4.2.0.58.20010828091013.00941e00@pop3.norton.antivirus> <4.2.0.58.20010828091013.00941e00@pop3.norton.antivirus> <4.2.0.58.20010828095858.00d39d90@pop3.norton.antivirus> Message-ID: <4.2.0.58.20010828152840.00bbe510@pop3.norton.antivirus> At 04:21 PM 8/28/2001 -0400, you wrote: >Thanks for your thoughts, Kirby, but I really think that two lists here is >the way to go OK, you've convinced me -- guess I was just sad to see the party move elsewhere. But I can always lurk (I may have some classroom stuff lining up too, as a free lancer). Kirby From pete@shinners.org Wed Aug 29 02:03:15 2001 From: pete@shinners.org (Pete Shinners) Date: Tue, 28 Aug 2001 18:03:15 -0700 Subject: [Edu-sig] Simple frame buffer module Message-ID: <3B8C3F53.2070505@shinners.org> > I'd like to announce the simple frame buffer module that > I wacked together after being fed up with having to create > a GUI every time I wanted to illustrate something simple > in Python (such as the iterative improvement of some problem). > A short sample: > > import fb # import module > f = fb.FrameBuffer() # create an instance > f.open(200, 200, "demo") # open a window named "demo" > for i in range(10, 190): # simple loop > f.fg = (i, i, i) # set fg colour > f.plot(i, i) # plot > f.flip() # flip buffers > raw_input('enter to quit') # wait for keypress > f.close() # close window it is nice to see more support for graphics based stuff coming in python. i'm the author of pygame, which does very similar things with SDL, http://www.pygame.org pygame is more of a full-coverage wrapping for the SDL library, which could make it a bit top-heavy for someone looking for simple framebuffer access. still, it can perform like this above example without too much extra overhead. pygame.init() #initialize f = pygame.display.set_mode((200,200)) #open framebuffer for i in range(10, 190): f.set_at((i, i), (i, i, i)) #set grey pixels pygame.display.flip() #flip buffers while pygame.event.wait().type not in (QUIT,KEYDOWN): pass #wait for input pygame.quit() #optional quit From wesc@deirdre.org Wed Aug 29 07:43:46 2001 From: wesc@deirdre.org (Wesley Chun) Date: Tue, 28 Aug 2001 23:43:46 -0700 (PDT) Subject: [Edu-sig] Python Comp Sci course. In-Reply-To: <5.0.2.1.0.20010824112837.00a71cf0@pop.mail.yahoo.com> Message-ID: On Fri, 24 Aug 2001, Robert Rickenbrode II wrote: > > Hey folks, I"m gearing up to teach a Python-based computer science course. robert, sounds great! a good number of people on this list are doing that. i current teach a professional education Python course for UC Santa Cruz Extension (next class is Winter 2002 quarter). it's an 8-week course with one meeting per week. i give quite a bit of homework in this class (as many of my students would attest [and protest] to) :-) many of these exercises are geared towards exercising your creativity while doing some real code to help hammer home the concepts. i put many (if not all) these exercises in the book "Core Python Programming" which i did for Prentice Hall last year. if you are interested in seeing some of the exercises, just let me know! > 3. I'd like to include a significant amount of history in the class. one book that has only a single yet loaded chapter on history is called "Computer Science: An OVerview" by Glenn Brookshear. it's used in *many* college intro courses (hence why i think it's like on its *7th* ed. or something like that)! > Thoughts, suggestions, comments, references? there are some other courses which use Core Python Programming as a text reference, and some of these courses have websites which may also be of use to you. here are two of them: http://sandbox.mc.edu/~gwiggins/syllabi/csc233/csc233-python-syllabus.html http://hebb.cis.uoguelph.ca/~dbm/teaching/CIS2450/ good luck, and let me know how it goes! -wesley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Silicon Valley-SF Bay Area Python users group: http://baypiggies.org "Core Python Programming", Prentice Hall PTR, December 2000 http://starship.python.net/crew/wesc/cpp/ wesley.j.chun :: wesc@baypiggies.org cyberweb.consulting :: silicon.valley, ca http://www.roadkill.com/~wesc/cyberweb/ From mlh@caesun.msd.ray.com Wed Aug 29 18:11:37 2001 From: mlh@caesun.msd.ray.com (Milton L. Hankins) Date: Wed, 29 Aug 2001 13:11:37 -0400 Subject: [Edu-sig] An introduction, request for slides and/or lesson plans Message-ID: <3B8D2249.B6488ADB@caesun.msd.ray.com> Hello, my name is Milton Hankins. I've been thinking of teaching an information Python class at my company. The target audience would be software engineers who already know how to program. I found David Beazley's slides on the Internet. Are there any other resources available? I searched the web and found some reference to Mark Lutz's work, but the links are all broken. -- ><> Milton L. Hankins 7-225-4728 <>< Software Engineer, Raytheon Company -- but these are my opinions. "I am not a nutritional anthropologist." --Alton Brown From rkr_ii@yahoo.com Wed Aug 29 18:41:46 2001 From: rkr_ii@yahoo.com (Robert Rickenbrode II) Date: Wed, 29 Aug 2001 13:41:46 -0400 Subject: [Edu-sig] Re: Python CS Education Page In-Reply-To: Message-ID: <5.0.2.1.0.20010829133905.00a6e5e0@pop.mail.yahoo.com> Tim wrote: > I keep hearing about more teachers who, like myself, are using Python to > > teach programming in high schools around the U.S. Perhaps it would be nice > > to have a page at python.org in the edu-sig section listing the schools and > > teachers who are using it. Of course I have no idea how we'd find everyone, > > and perhaps finding a small number of teachers listed on the page would > be a > > disincentive for teachers who are just discovering Python. Dethe wrote: >I like this idea, especially if it can double as a lesson-plan >repository. I think setting up a Wiki or a Zope where many people can >participate in maintaining it might be more useful that a page at >python.org (those don't seem to change very often). > >What do y'all think? Oh, and let's not be exclusive to the US. Some of >us in the free world teach python too %-) I agree with these sentiments and think that it would be very help. However, please no Wikis! (Blech!) Best, Rob Robert K. Rickenbrode II rkr_ii@yahoo.com From jhrsn@pitt.edu Wed Aug 29 19:33:29 2001 From: jhrsn@pitt.edu (Jim Harrison) Date: Wed, 29 Aug 2001 14:33:29 -0400 Subject: [Edu-sig] Another Python class Message-ID: FYI, information on a new course, Problem-Oriented Programming in Medical Informatics, is available at: http://jhh.cbmi.upmc.edu/pop/ This course targets graduate/post-graduate students who have limited or no programming experience and who are moving into medical informatics. These students typically have backgrounds in the medical/dental sciences, medical library science, or biology/chemistry. In previous years they have taken a one-semester course in C as a prerequisite to other information science courses; few of them program after completing these courses--and some choose to avoid programming. The new course is being offered for the first time this fall in an attempt to give the students a tool set that can be learned quickly, supports the study of information systems, will be useful after coursework is completed, and has the depth to stimulate students to continue to develop their skills. Though this set of requirements is similar to what's needed in secondary and introductory higher education, I think that graduate/post-graduate students--particularly those returning to academics from the workplace--have some unique characteristics and that Python is particularly suited to them. Jim Harrison ________________________________________________________________________ James H. Harrison, Jr., MD, PhD Associate Director of Pathology Informatics, Department of Pathology CLSI 5807-MT, 200 Lothrop Street Pittsburgh, PA 15213-2582 voice: 412-647-5529 | fax: 412-647-5934 Faculty Member in Residence, Center for Biomedical Informatics University of Pittsburgh Suite 8084 Forbes Tower Pittsburgh, PA 15213-2582 voice: 412-647-7113 | fax: 412-647-7190 "If you want sense, you'll have to make it yourself!!"-Norton Juster ________________________________________________________________________ From agauld@crosswinds.net Thu Aug 30 05:12:33 2001 From: agauld@crosswinds.net (agauld@crosswinds.net) Date: Thu, 30 Aug 2001 05:12:33 +0100 Subject: [Edu-sig] Another Python class In-Reply-To: Message-ID: <04201025097186@mailth4.freenet.co.uk> On 29 Aug 01, at 14:33, Jim Harrison wrote: > Though this set of requirements is similar to what's needed in secondary and > introductory higher education, I think that graduate/post-graduate > students--particularly those returning to academics from the workplace--have > some unique characteristics and that Python is particularly suited to them. Interesting. That was very much the target audience I had in mind for my web tutor and book. Less formal than a fuull CS course but more advanced background/age wise than a high schoool student. Alan Gauld http://www.crosswinds.net/~agauld From altis@semi-retired.com Thu Aug 30 16:17:04 2001 From: altis@semi-retired.com (Kevin Altis) Date: Thu, 30 Aug 2001 08:17:04 -0700 Subject: [Edu-sig] would you use PythonCard? Message-ID: Hi, most of you have probably seen PythonCard http://pythoncard.sourceforge.net/ posts to the edu-sig list or comp.lang.python. I would like to get a feel for how many users on the edu-sig list are even remotely interested in PythonCard? I realize that it is too late to incorporate it into lesson plans for this fall and wouldn't recommend that anyway given that it is in a prototype stage, but I'm hoping that it will be useful in education, so I want to get your feedback. I think that the runtime is a very good environment for learning Python as well as doing GUI programming. The simplicity of using the GUI components should be especially suited for enhancing the learning of Python concepts without forcing the use of command-line input and output. Just as importantly, I would like to know particular reasons for a lack of interest. This will help to focus how the prototype evolves and who the target audience is. If you're in the camp of "What the heck is PythonCard and why the heck should I care?" then I refer you to the home page above first and can then answer any specific questions you may have. The more criticism the better. You can reply to this thread or email me directly and I'll summarize for the list. Thanks for your time, ka --- Kevin Altis altis@semi-retired.com ps. If you *are* interested in PythonCard, you should join the mailing list to contribute feedback... http://lists.sourceforge.net/lists/listinfo/pythoncard-users From Jason Cunliffe" Message-ID: <003301c13191$450292a0$c3090740@jasonic> Hi Kevin Your post prompted me to check out PythonCard. Downloaded it to Win89se syetem with Python 2.1 installed. Took a summer break from computers recently, so I'm probably being very dumb but cannot find any 'getting started' instructions anywhere. How do I start PythonCard? Do / Can / Should I run it from PythonWin, IDLE or Pycrust? What are the first 10 things to do to get it up and running? I would love to recommend it to my 12 year-old nephew who is just starting on Python [His first language]. But I know a;raedy he has has major trouble understanding how to load Python programs " Python's really hard he says". At his age and experience especially getting started is what is is all about. He plays lots of games adn is very quick to uss them out, but installing langauge packages adn deciphering typical programmer's READMEs is an art he has yet to learn. An extended version of your HTML screenshoots formatted as a "Getting Started" Tutorial woould be the first help for anyone I think. What level of programming experience do you think PythonCard is good for? Myself I love Pthon and much more besides, but still find it very frustrating installing and running Python packages. Anything you can do to enhance this aspect of PythonCard is for the good I am sure. Meanwhile I signed up to the PythonCard mailing list and will do some more homework, browse the archives etc. Thanks in advance any help - Jason ----- Original Message ----- From: "Kevin Altis" To: Sent: Thursday, August 30, 2001 8:17 AM Subject: [Edu-sig] would you use PythonCard? From fcy@acm.org Thu Aug 30 18:31:26 2001 From: fcy@acm.org (fcy@acm.org) Date: Thu, 30 Aug 2001 12:31:26 -0500 Subject: [Edu-sig] would you use PythonCard? In-Reply-To: ; from altis@semi-retired.com on Thu, Aug 30, 2001 at 08:17:04AM -0700 References: Message-ID: <20010830123126.A6829@ontosys.com> On Thu, Aug 30, 2001 at 08:17:04AM -0700, Kevin Altis wrote: > I would like to get a feel for how many users on the edu-sig list are even > remotely interested in PythonCard? I looked into PythonCard after your first announcement. Here's the impression I got: + Visit site on SourceForge. Look at "screenshots" page. Seems to be a GUI builder. Yawn. + Follow link to "Samples 2" page. Now these "turtle" applications look more interesting. But there's no hint as to how one develops such applications. + Follow link to "requirements" document. It seems to sketch GUI elements to appear in the user interface. But I get no feel for what PythonCard really _does_. So, I wait for the project to mature a bit and provide more useful information about its goals. -- Fred Yankowski fred@OntoSys.com tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA From altis@semi-retired.com Thu Aug 30 19:45:10 2001 From: altis@semi-retired.com (Kevin Altis) Date: Thu, 30 Aug 2001 11:45:10 -0700 Subject: [Edu-sig] would you use PythonCard? In-Reply-To: <20010830123126.A6829@ontosys.com> Message-ID: > From: fcy@acm.org > > I looked into PythonCard after your first announcement. Here's the > impression I got: > > + Visit site on SourceForge. Look at "screenshots" page. Seems to be a > GUI builder. Yawn. The screenshots pages don't show all the samples and they don't show any of the runtime windows like the Shell, Message Watcher, Property Editor, or Namespace Viewer. Hopefully, those pages will be beefed up soon. PythonCard is more than a GUI builder, but even so, why would you 'Yawn'? I'm curious what you currently use with Python. Obviously, there are great GUI tools for commercial languages, but everything for Python is pretty limited either by the underlying toolkit (tk) or there are costs involved in the runtime or development tools. More importantly, most of the framework tools take a monolithic approach which is fine for large team projects, but is really hard on the beginner or infrequent user. None are geared towards RAD for simple projects which should be completed in fifteen minutes to an afternoon while still working for larger projects. The question becomes what would be exciting? I jumped on the PythonCard idea because Python is a magical language missing the framework and environment for doing normal desktop applications and utilities. I know this probably sounds defensive, but I really would like to hear your opinions. > + Follow link to "Samples 2" page. Now these "turtle" applications > look more interesting. But there's no hint as to how one develops > such applications. Yet another need for more documenation. There is actually quite a bit in the turtle directory, but it could use more. > + Follow link to "requirements" document. It seems to sketch GUI > elements to appear in the user interface. But I get no feel for > what PythonCard really _does_. Good point. The requirements document should go away. It filled its original purpose which was to get us to the first pass at a prototype, which we've done. We're still enhancing the prototype, but we're beyond the initial requirements, which we needed when we started coding about six weeks ago. PythonCard is many things, but right now it is an application framework and a set of runtime tools to enhance and aid programming in PythonCard. Eventually, there will be an environment, so that you can dynamically add and edit widgets, scripts, etc. much like HyperCard. In addition, like HyperCard the framework will support transparent data storage, so if you just want to use PythonCard for simple database-type apps, little to no coding will be required. Part of what makes the framework (which is still fairly limited) different now is that the widget usage is basically like using any other Python object. More importantly, resource files are supported, so you don't have to mix widget descriptions in with your code and all the event binding is dynamic, so if you have a Button widget named 'btnRun' and a field named 'field1' in your app and you want to do something in response to a mouseClick on that button, you simply add a method def on_btnRun_mouseClick(self, target, event): self.components.field1.text = 'hello' That's it! No event tables, no callback definitions, no window handles, no initialization, you can even create widgets dynamically and they'll bind to any appropriate handlers you already have. > So, I wait for the project to mature a bit and provide more useful > information about its goals. The project is still 'alpha'. The reason I'm actively promoting it is to make sure that it has an audience once it goes beyond alpha. It is still usable today and will continue to be, but the API changes as features are added, changed, or removed and we turn wxPython specific calls into wrapped PythonCard calls. Consequently, nobody should be building a big project today based on PythonCard and they should realize that small changes might be necessary in any code they write, though it might be a simple find/replace kind of change. All the samples are kept up to date with the current framework as changes to the API are made. Thanks for responding, ka From altis@semi-retired.com Thu Aug 30 19:50:27 2001 From: altis@semi-retired.com (Kevin Altis) Date: Thu, 30 Aug 2001 11:50:27 -0700 Subject: [Edu-sig] would you use PythonCard? In-Reply-To: <003301c13191$450292a0$c3090740@jasonic> Message-ID: > From: Jason Cunliffe > > Your post prompted me to check out PythonCard. > Downloaded it to Win89se syetem with Python 2.1 installed. You'll also need wxPython for Python 2.1 http://www.wxpython.org/ The pre-built binaries are at: http://www.wxpython.org/download.php#binaries > Took a summer break from computers recently, so I'm probably > being very dumb > but cannot find any 'getting started' instructions anywhere. There aren't any docs other than what is in the docs directory, I'm working on them, so I'll use this opportunity to create some 'content' for the first draft Getting Started document. > How do I start PythonCard? > Do / Can / Should I run it from PythonWin, IDLE or Pycrust? > What are the first 10 things to do to get it up and running? Assuming Python 2.1 and wxPython are installed and running correctly, you need to move the PyCrust and PythonCardPrototype package directories to your python21 directory. If you want, you can move the 'samples' directory to a more convenient place. The only thing you run are the standalone samples or a sample you write yourself. All you have to do is double-click one of the .py files like 'samples\minimal\minimal.py'. You can also run the files from the command-line, and the command-line is probably preferred if you want to invoke one of the debug windows (see below) with the program. The one thing you should not do is run a sample from within PythonWin or IDLE since neither of those IDEs launches an app in a separate process, so you'll run into GUI contention issues. You can launch from an IDE like Komodo. What I typically do is edit in PythonWin and keep a shell window (DOS prompt) open to run the program once I make an edit change; alternatively keep a shortcut to the program or an Explorer window open to the directory the program is in so you can double-click it. Sometime in the future, there will be a PythonCard environment that allows you to edit scripts and run. The files ending in '.rsrc.py' are the resource files and are not runnable themselves. There is a description of each sample in samples.txt of the docs directory. The following files are standalone samples (directory structure shown): samples addresses addresses.py conversions conversions.py dbBrowser dbBrowser.py This sample requires mySQL to be installed and running. dialogs test_dialogs.py findfiles findfiles.py minimal minimal.py You should copy the minimal folder when you're ready to start your own PythonCard program. See the tutorial.txt file in the docs directory for more information. proof proof.py resourceEditor resourceEditor.py This is the GUI editor for resource files. Release 0.4.3 doesn't support saving files, but you can open any .rsrc.py file, add widgets, delete, move and resize, and duplicate widgets. The Property Editor window is used to change attributes of each widget such as the backgroundColor. searchexplorer searchexplorer.py sounds test_sounds.py SourceForgeTracker SourceForgeTracker.py textIndexer textIndexer.py This sample requires either Zope or standalone ZODB to be installed. tictactoe tic.py turtle test_turtle.py widgets test_widgets.py worldclock worldclock.py You can change the .py extension to .pyw on any of the samples if you want to get rid of the console window that pops up when you run the program. Command-line options Valid command-line options are: -m (Message Watcher), -p (Property Editor), -s (Shell) and in cvs -n (Namespace Viewer); the Namespace Viewer is in cvs, but not in a release version yet. Invoking any of those options will actually give you all of them and then you can hide/show any of the windows via the Debug menu. You can set the default position and size of each window and whether it appears by default by copying the 'pythoncard.config.py' file in the PythonCardPrototype directory and renaming the copy to 'pythoncard.user.config.py' This is what mine looks like: { 'gui':'wxPython', 'logfile':'pythoncard.log', 'showMessageWatcher':0, 'messageWatcherPosition':(900, 0), 'messageWatcherSize':(200, 300), 'messageWatcherVisible':1, 'showPropertyEditor':0, 'propertyEditorPosition':(750, 350), 'propertyEditorSize':(360, 240), 'propertyEditorVisible':1, 'showShell':0, 'shellPosition':(50, 600), 'shellSize':(700, 230), 'shellVisible':1, 'showNamespace':0, 'namespacePosition':(0, 0), 'namespaceSize':(800, 300), 'namespaceVisible':1, 'defaultStackPosition':(5, 5), 'enableLogging':0 } I don't have any of the windows enabled by default since I use several of the samples all day long (worldclock, searchexplorer, and SourceForgeTracker) and don't want a debug menu or debug windows for them. I run a sample from the shell when I want debug windows. > anyone I think. What level of programming experience do you think > PythonCard > is good for? If someone is up for Python, I don't think PythonCard takes much more effort, less if you think of the pain of doing command-line input/output. It is mostly a matter of copy and paste and following some coding conventions, which we're in the process of documenting. You don't have to worry about event tables, id bindings, window handles, pack, etc. At this point, the widget set is much more limited than if you programmed wxPython directly, but we're closing the gap each day. > Myself I love Pthon and much more besides, but still find it very > frustrating installing and running Python packages. Anything you can do to > enhance this aspect of PythonCard is for the good I am sure. Meanwhile I > signed up to the PythonCard mailing list and will do some more homework, > browse the archives etc. We've debated back and forth on the installation issue. On one hand, we should support dist-utils, but we also need to make it so that you just double-click and run a normal installer since requiring the user to type 'setup install' defeats part of the purpose. Since we're at the prototype stage, that's a bit much for releases that happen every few days. For now, you just drop the directories into your python21 directory and you're set. > Thanks in advance any help > - Jason Thanks a lot, keep the questions coming. I'm going to work on the Getting Started and post to the pythoncard-users mailing list later today. ka From fred@ontosys.com Thu Aug 30 20:11:25 2001 From: fred@ontosys.com (fred@ontosys.com) Date: Thu, 30 Aug 2001 14:11:25 -0500 Subject: [Edu-sig] would you use PythonCard? In-Reply-To: ; from altis@semi-retired.com on Thu, Aug 30, 2001 at 11:45:10AM -0700 References: <20010830123126.A6829@ontosys.com> Message-ID: <20010830141125.A7352@ontosys.com> On Thu, Aug 30, 2001 at 11:45:10AM -0700, Kevin Altis wrote: > PythonCard is more than a GUI builder, but even so, why would you 'Yawn'? > I'm curious what you currently use with Python. I mostly use Python for command-line applications. Where I've wanted a GUI, tkInter has been OK (but not great). If PythonCard turns out to be an effective GUI builder platform, I'm interested. But not interested enough right now to play with alpha software that has no obvious order-of-magnitude improvement over the status quo. That said, my "yawn" was disrespectful. Sorry. > The question becomes what would be exciting? I would be excited by a system similar to DiSessa's "Boxer" application. Boxer only works on the Apple Macintosh, completely blocking me from using it at home and from offering to teach using it at my sons' grade school. Maybe PythonCard is heading in Boxer's direction; I couldn't tell from the documentation I could find. I'll stay tuned. The description your latest message gave of PythonCard was helpful. The PythonCard website would benefit from content like that. > > So, I wait for the project to mature a bit and provide more useful > > information about its goals. > > The project is still 'alpha'. The reason I'm actively promoting it is to > make sure that it has an audience once it goes beyond alpha. You may have to bootstrap the project a bit more to where you can "sell" it more effectively. As it stands, it's hard for me to justify spending much time on it. SourceForge is full of projects that have withered in the "alpha" stage -- I've created several myself. The fact that you're spending the time to champion PythonCard in these messages is a good sign. There's too much interesting stuff out there to get by on "build it and they will come". -- Fred Yankowski fred@OntoSys.com tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA From agauld@crosswinds.net Fri Aug 31 23:43:41 2001 From: agauld@crosswinds.net (agauld@crosswinds.net) Date: Fri, 31 Aug 2001 23:43:41 +0100 Subject: [Edu-sig] would you use PythonCard? In-Reply-To: References: <20010830123126.A6829@ontosys.com> Message-ID: <22510929678770@mailth4.freenet.co.uk> On 30 Aug 01, at 11:45, Kevin Altis wrote: > > GUI builder. Yawn. > PythonCard is more than a GUI builder, but even so, why would you 'Yawn'? Coz there are lots of GUI builders already? And GUI builders for a language like Python are not so productive. In a language like VB or Delphi (which I personally love to bits) they are near essential but Python operates at a higher level and used in conjunction with an interpreter session a GUI builder is pretty much redundant for anything but big complex GUIs. > I'm curious what you currently use with Python. IDLE and Pythonwin sometimes. But mainly just a DOS box and a vim editor... > GUI tools for commercial languages, but everything for Python is pretty > limited either by the underlying toolkit (tk) Thats a common misconception but in fact Pythons dynamic nature means you can construct the GUI piece by piece from the Python prompt. Changing positions by just unpacking and repacking as you go. It does help to sketch out the general layout first but thats true of VB etc too. But python is far more dynamic that the layout tools in VB or Delphi etc. > the runtime or development tools. More importantly, most of the framework > tools take a monolithic approach which is fine for large team projects, Huh? Most take (or at least allow) a very OO approach that encourages separate developments - either of individual 'super widgets' or of discrete 'windows' or dialogs. In fact I'd say VBs approach is more monolithic than Pythons. Python does require you to work differently - more like a Smalltalk project than a VB/Delphi one. > is really hard on the beginner or infrequent user. This is true - power has its own penalties. Same is true of vim and emacs as editors. Maybe PythonCard has the better approach for occasional users. > None are geared towards RAD for simple projects > which should be completed in fifteen minutes This is totally wrong. Python and its GUI toolkits (Tkinter and wxPython are the ones I've used) are very much more appropriate to real RAD than most GUI Buildr based tools. Python keeps the focus on the function of the program not the appearance. VB might be prettier initially but Python will work better, faster. > because Python is a magical language missing the framework and environment > for doing normal desktop applications and utilities. No, Python just has a different approach. Try playoing with the Smalltalk workspace for a while, or talk to some Smalltalk programmers and see why Smalltalk is considered one of the most productive RAD tools around. Then do the same things in Python...(but without the class browser :-( ) > sounds defensive, but I really would like to hear your opinions. Not at all. Its a common perception for those coming from "traditional", aka GUI based RAD tools. Once you get used to Pythons approach its not really that much slower and nearly always delivers better core functionality. > PythonCard is many things, but right now it is an application > framework and a set of runtime tools to enhance and aid > programming in PythonCard. Which are laudable aims and to be encouraged. > Eventually, there will be an environment, so that you can dynamically > add and edit widgets, scripts, etc. But I can already do that with Tkinter etc now. Its called the Python prompt... much like HyperCard. In addition, like > just want to use PythonCard for simple database-type apps, little to no > coding will be required. Could you expand on this aspect please? > fairly limited) different now is that the widget usage is basically like > using any other Python object. How is this different to Tkinter? > More importantly, resource files are supported, > so you don't have to mix widget descriptions in > with your code and all the event binding is dynamic, Resource files are one way of doing this and Parrot tries it for Tkinter... But Python supports this out of the box by simply defining the app code in a separate moduile and binding its functions/methods to the GUI elements. This is normal best practice. And its all dynamic binding in Tkinter - you can even change the bindings mid program if you really want to. > 'btnRun' and a field named 'field1' in your app and you want to do something > in response to a mouseClick on that button, you simply add a method > > def on_btnRun_mouseClick(self, target, event): > self.components.field1.text = 'hello' > > That's it! No event tables, no callback definitions, no window handles, no > initialization, But how do you change the behaviour of that during program execution? Thats less dynamic not more... (Yes, you could create a new function and assign it to on_btnRun_mouseClick via a lambda or using nested scopes I guess) > you can even create widgets dynamically and they'll bind to > any appropriate handlers you already have. I'm not convinced having to write a single line of binding code is that big a deal... I think PythonCard sounds like an interesting developnment. Like HyperCard its probably a better approach for occasional users and, like HyperCard, probably will have less attraction for 'power users'. All just my opinion of course. Alan g.