[<<] Industrie Toulouse

September 28, 2003

In a comment, I was asked "what CMS would you recommend thats very simple, very quick and very dirty? Is there huge disadvantages to writing your own?"

First, I would not ever suggest very quick and very dirty. Quick and Dirty leads to high technical debt, as explained in this excellent Martin Fowler post. You incur higher interest payments over a longer period of time, in the form of code maintenance and burden. Personally, I prefer projects that I can go back to after deployment, having not touched them in a long time, and go "wow, it still works!" to the projects that I go into time and again and grumble every time I do so because there was no real architecture built.

So with that, I would recommend against "rolling ones own". There are a lot of people tackling the web content management domain. For very simple, I would probably recommend a small commercial product like Macromedia Contribute. Adobe GoLive uses WebDAV very well to facilitate group web site management and development.

For a server solution, I would go with Plone. There are a lot of excellent add ons available for it and a lot of customization options out of the box.

But I have no recommendation of quick and dirty systems. They're just not worth dealing with. I have enough debt in my life.

Update: On Evaluating CMS Solutions

Like all software, content management systems need to be evaluation based on an organizations or individuals needs. Questions need to be answered, such as how many people will be contributing content, how technically savvy they are, if features like workflow (publish/review, etc) or staging are required, etc. The concept of the site also needs to be considered. Is it an intranet? Is it a knowledge management base? Is it public? Is it personal? Is it a group? Is a CMS really needed? The current breed of HTML editors, such as Adobe GoLive and Macromedia's Dreamweaver and Contribute, are well equipped to handle group authoring and very smart site management. In some cases, that might be enough.

J. Shell, September 28, 2003 10:52 PM, in Etc

September 26, 2003

Thanks to the current issue of Wallpaper*, I'm reminded of one book that I've been meaning to get, and notified of another one I need to get:

  1. Where's My Space Age? - I've long been of the opinion that we were robbed of our deserved space age. So to see a book with a title very similar to a title that's always been in my head of a book that should be written makes me happy. Kindof like having a dream of a Helmut Lang sweater and then seeing it on the racks a year and a half later. The link between technology and aesthetics was never as beautiful as it was at the height of the space race. Last night, I saw the IMAX 3D film about the space station, and was reminded of this as I oooo'd with delight at the various Soviet and even American structures that date back to that time. And the space station in Kubrick's 2001 has always been a dream place for me.
  2. Merz to Emigre and Beyond I just have to have this one. Kurt Schwitter's Merz and Merzbau have had a glaringly obvious impact on the naming and style of the prolific Japanese noise artist Merzbow, who I'm a fan of. Merz and Emigre both have had such fun with pages and type in a way that I've always loved. "Schwitters and his contemporaries elevated the collage to a graphic artform and their work was often presented in the form of prints and publications." Yes. I must have this.

J. Shell, September 26, 2003 10:50 AM, in Aesthetics

September 23, 2003

As time goes by, I'm less and less intimidated by Zope 3. I've always been excited for Zope 3, but I was also afraid about the amount of relearning I'd have to do. What's lessening this fear is that recent development work that I've been doing, based on Zope 2, has been following more and more of a "Zope Component Architecture" approach. The patterns, some of which I started using a few years ago on the CMF team at Zope Corporation, are becoming more and more familiar. I'm getting quite excited to see the new levels of development that Zope 3 will bring.

J. Shell, September 23, 2003 04:14 PM, in Bullet Arthritis

September 22, 2003

I admit it - I was a little bit disappointed when Apple showed off Panther (the fourth release of Mac OS X) at their world wide developers conference. But over the past few months, the want has been building up.

I'm not going into my disappointments here - I have a longer article in mind for that. But there are a lot of things that are interesting, that of course only really come out when looking at new libraries, widgets, options, etc, that are available to developers. The Cocoa framework has picked up some incredible new features that just blew me away (that I probably can't share). It looks like a lot of work has gone into refining the user interface and making certain widgets more common in their look and feel. Looking at the few developer sessions that are available to me makes me realize how much the little touches add up into an ever more compelling system release and user experience. (A diatribe comparing the damage the mega-release strategy has done to users perception of software is another post for another day).

The feature I'm looking most forward to, however, is the new iDisk support. iDisk is personal storage on Apple's .Mac services. It's nice to be able to easily share documents between my three aging machines, but iDisk is slow to deal with. In Panther, there's basically an automatic/semiautomatic folder synchronization system running behind it. All of your iDisk files are kept locally, so that reads and writes happen at the same speed as all other local access. But the system can then synchronize those changes automatically or manually. This also allows for offline access, and is very tasty for working with personal college notebooks across all my machines.

J. Shell, September 22, 2003 10:31 PM, in Bullet Arthritis

I love Harper's. In fact, I finally dropped a subscription card in the mail this weekend after having bought it at the newsstand for over a year. I'm very late in coming to this magazine, I know. This is my first subscription since I let my New Yorker subscription lapse last spring. It's so hard to keep up with the weeklies sometimes. I am still looking for a second monthly to add to my subscription list, and am leaning towards The Atlantic Monthly. No commitments yet though - I just started my second issue. I like how both magazines look, and so far they read rather well. I picked up an issue of Time recently, and it was absolutely unreadable with all of its sidebars, timelines, thin paper, and abundance of ads. Ugh.

I'm still trying to figure out how I ever managed to read most of both The New Yorker and The Economist each week.

J. Shell, September 22, 2003 10:10 PM, in Bullet Arthritis

In the spirit of the great bullet series at Ars Technica, I had planned to make an entry here of similar size - a few nicely painted bullet points accurately set up for the PowerPoint Generation. Instead, the Bullet Arthritis series will tend to be shorter posts that are a tiny bit heavier on the emotion than some of the longer articles that are posted here.

I know that some people use their weblogs to only publish little bullet items, such as Scripting News (when was the last time Dave talked about scripting? Shouldn't it be called "blogging about bloggers who blog about blogging and the journalists who don't understand the bloggers who blog about journalism and blogging but don't blog themselves news?"), while others of us prefer reading and writing article-length entries most of the time. But due to the overwhelming lament-for-OpenDoc entry I have saved in an editor at work that I haven't touched for a week, I'm thinking I should lighten up for a bit. Hence - Bullet Arthritis.

J. Shell, September 22, 2003 10:05 PM, in Bullet Arthritis

September 16, 2003

One of the primary stumbling points in my search for a personal note management system that I can carry with me through at least my next year of college has been equations. After a couple of days of looking at various solutions, I settled on using LaTeX. Fortunately, I found a good page covering how to download and install base TeX packages on Mac OS X, as well as offering links to various front ends.

I would have preferred not to go this route - LaTeX is not a terribly easy system, particularly when all I need is the ability to enter different equations and formulas into my notebook. But the only commercial offering I could find cost twice as much as the Note Taking application that I'm getting closer to buying. I've considered writing to Aqua Minds suggesting that they include an equation editor with NoteTaker, but decided against it. Generally, I like applications that specialize in their offerings. It seems to be a very Mac thing to do, especially in Mac OS X. But the tight integration offered by the lamentably axed OpenDoc is still missing.

One of the TeX front ends that I came across give me hope, and that is EquationService. "Services" are an age-old NeXT technology that let applications offer new functionality to the whole system, and are still present in Mac OS X today. Nicely, more and more applications are starting to offer them. EquationService takes the cake though. What it offers is the ability to enter TeX in any application that supports Services (almost all Cocoa applications, and some Carbon ones as well). The LaTeX source can be selected, and via the "Services" menu one can select "TypeSet Equation", and the equation will be replaced by a fully typeset image. Basically, this adds TeX support to any rich text application in Mac OS X. It's not OpenDoc, but it's close. It fits in nicely with NoteTaker, which didn't take too kindly to some other TeX editors which generated PDF's that could be dragged and dropped. Since they would always get dragged with the same file name, NoteTaker seemed to get confused when you had more than one dragged in.

Another feature that Equation Editor has is that it embeds the source used to generate a PDF inside of the PDF, so that it can be extracted ('untypeset') inline to edit the source of the equation. Application support for this seems to be a bit squirrelly. For example, in TextEdit, this feature is supported if a rendered equation is dragged and dropped out of the EquationService's editing window instead of having been generated inline. Other applications may fare differently.

J. Shell, September 16, 2003 10:32 PM, in Apple / Mac

September 15, 2003

In response to my last entry, Taking Note, Rob Tillotson pointed out NoteBook from Circus Ponies. Apparently, they are descended from the same NeXTStep application. The two founders of Millennium Software Labs, who made Notebook for the NeXTStep operating system, went off their separate ways. Co-Founder Scott Love apparently got the rights to Notebook's source code (for NeXTStep) and that went into AquaMinds NoteTaker. But then other Millennium Software Labs Co-founder Jayson Adams came out with NoteBook, his (re?)implementation of the original Notebook for Mac OS X. Fascinating. Because they both look really similar, and offer similar functionality.

I had basically sold myself on NoteTaker to start organizing school notes, but now I think I'll give the Circus Ponies' NoteBook a chance before committing.

J. Shell, September 15, 2003 11:31 PM, in

OneNote and OmniOutliner

A fairly recent news item at Ars Technica about Microsoft's OneNote student pricing caught my attention. OneNote is a new Office application that's supposed to act as a central place for storing any kind of notes. Ars Technica's posting posited that a tablet PC, combined with OneNote, could be an effective system for taking notes in class. With the Tablet PC, you could have your computer sitting like a regular notepad to jot down notes. And with OneNote, you can also record voice memos. It's not a bad idea - I know that having a regular laptop in my math class would be awkward (especially in Math, where you're writing equations that don't map to typical keyboard input). Would a Tablet PC make sense? I can't say for certain - I've never used one. For me, paper seems to be a fine in-class solution. But it died get me to thinking about how I might transcribe and order my notes as I start expanding my class list in the future, using Mac OS X.

I've long been a fan of OmniOutliner. OmniOutliner is a simple, fast, and fairly flexible outliner program. I've found it useful for thinking out algorithms and tasks in the past. It's speed, interface, and price make it a great entry system. But would it work for more complex note management? I doubt it. There's little support for rich media or more advanced categorization and management. What are some alternatives?

VoodooPad

There are a couple that have caught my eye recently that I'm evaluating (lightly). The first is VoodooPad. VoodooPad labels itself as a "Personal Wiki" and from what I've seen so far, it lives up to that label. Traditionally, I have not been fond of Wikis. But a personal one that's free from Web based input is not as bad as I would have thought. It's a lot faster to work with, for one thing. One can type "We need to expand the ShoppingCart interface to allow for...", and immediately 'ShoppingCart' is revealed as a potential link. A click on it creates a new page in the VoodooPad document - there's no 'save / click / create' process that one has to deal with in web based situations. Since it's using Mac OS X's Cocoa text system, one gets automatic spell checking and complete rich text support, as well as the ability to paste or link to rich media.

VoodooPad also supports Inkwell, Mac OS X's handwriting recognition system that descended from the Newton. Since there is no "Tablet PC" in the Apple world right now, this is limited to usage of a Wacom tablet. But it may help in jotting down fomulas in a Math class situation.

One of the most interesting aspects of VoodooPad is its support for the new Notes system in the third generation iPod's, which keeps links intact. It gives you a pocket wiki, for better or worse. In a school or even business situation, it could be a handy way of keeping short interconnected notes in your pocket for quick reference. Exporting to iPod Notes is done in one click - there's no "save as..." dialog box that pops up. Other export features include RTFD, HTML, and XML, as well as iPod 'Contacts' for older iPod systems.

VoodooPad could best be viewed as an alternative to OmniOutliner for those who prefer wiki style editing over outlines. It's still a simple system which, like OmniOutliner, lacks complex organization and management facilities. It does give one more space to think things out in a more prosaic fashion than an outline typically does, but lacks the quick reorganization capabilities of outlines.

NoteTaker

Another option is AquaMind's NoteTaker application. NoteTaker is a full featured note taking and management system. Its user interface is modeled on note pads. NoteTaker places tabs (on the side or bottom, according to user preferences) on the notepad for quick access to categories, and maintains a full table of contents. Each page can be individually styled to appear as ruled paper, graph, legal, etc. Entry numbering can be quickly set to different common styles, such as Harvard or Legal. A Notebook Drawer element can be set to slide out for rapid access to the entire notebook, a library of notebooks, and history (recently visited pages). NoteTaker also has the ability to generate an index section, which provides links back to pages that mention the item. The index itself is divided into different pages, such as 'Text', 'Proper Names', 'Websites'.

NoteTaker has comprehensive rich media support, and includes the option of recording voice memos right into the notebook. Outline elements also can have a 'type' associated with them, with the ability to create custom ones. Built in elements include 'link', 'clipping', 'document', etc.

On the import/export front, NoteTaker features Plain and Rich Text (RTF), delimited text, mail merge, vCard, and OPML. OPML import from OmniOutliner worked quite well when I tested it. NoteTaker also features the ability to generate "Web Notebooks" which seem rather comprehensive, if this example site gives any idea.

The only thing I would like to see is the integration of something like babyTex for math equations - hell, any kind of equation editor would be fine. This is usually where I start ranting and raving and whining about the need for OpenDoc, but I'll leave that alone today.

But as a serious note management application, NoteTaker is very impressive, and is a serious alternative or replacement for what OneNote is trying to be. As an outliner, OmniOutliner is easier and more responsive. But NoteTaker's comprehensive features really allows someone to maintain an exhaustive notebook for all their college courses, or for a business project, or anything else for that matter. It's navigation, indexing, and page customization features allow for a single notebook to fulfill many different uses. As stated above, however, it might not be the best math solution. For that, I'm starting to think that Mathematica's notebook system may be better suited.

J. Shell, September 15, 2003 01:11 PM, in Apple / Mac, Review

Yesterday, I finally got around to seeing Capturing the Friedmans at the newly opened Madstone Theater in Salt Lake.

As a documentary, Capturing the Friedmans is particularly arresting in both its subject matter and primary forms of presentation. It's the story of an apparently typical upper-middle class family in Great Neck Long Island, until the father and one of the sons are arrested on molestation charges. The movie hints that the allegations and charges are grossly overstated, but there is some guilt in the family. Much of it is told using home movies and home videos that the sons (particularly the oldest) captured - whether it was of happier times or family meetings that turned into yelling matches.

The local Madstone Theaters are converted from older theaters in a fairly upscale shopping mall housed in old trolley barns. They're not up to some of the standards of new theaters (stadium seating, etc), but they are quite nice. Particularly - the spacing between rows of seats is quite wide, allowing for much easier movement and room to stretch out your feet. Having Madstone here increases the amount of screens dedicated to independent and foreign films by four. Just a couple of years ago, we were down to one. Now we have eleven. And a couple of the larger mega-theaters have also picked up some of the better known independent releases, such as Whale Rider. So while it's still not quite New York, there are a lot of nice options for alternative cinema. Nicely, this gives viewers greater chance of catching a good film because they can stay around longer while other screens rotate the offerings.

J. Shell, September 15, 2003 10:50 AM, in Review

September 13, 2003

There are two aspects to Johnny Cash that I have kept with me over the past decade as I've grown increasingly immersed in his music and legend.

The first is Johnny's direct, sparse nature as a performer. From his simple, standard, concert greeting of "Hi, I'm Johnny Cash" to the sparse, direct nature of most of his music. Many people are fond of saying "when Johnny Cash sings, you listen." It's true - you have no choice. Not only is his voice so unique, but the music was arranged so as not get away. The original Tennessee Three sound and the first American Recordings album especially bring this to light.

It was that first American Recordings album that brought Johnny Cash out of the background and into my life directly. It's an amazing album - just Johnny Cash and an acoustic guitar. It's raw and pure and honest, and holds many of my favorite songs, such as the Cash originals "Drive On" and "Redemption" as well as renderings of "The Cowboys Prayer / Oh Bury Me Not," Danzig's "Thirteen," and Jimmy Driftwood's "Tennessee Stud."

Since the time of picking that up, the second aspect picked up. That is, as I started to go into the history of Johnny Cash, I found myself going into family history. I found a lot of similar characteristics with my Grandpa, who passed away last October. Over the past year, his music has helped me cope with this family death which impacted me more than I expected.

Songs like "Jacob Green," which tells the story of a young man arrested on possession hanging himself in jail are very powerful. This is Johnny's folk music aspect - this is a story (based on a true story that happened in Virginia) about corruption, about "if you turn your head away, somewhere in some dirty hole the scene will be rerun. Not only Jacob Green, but many more you've never seen. It could be someone you love gets done like Jacob Green got done." The song not only addresses prison suicides, even on small charges, but also corruption: "but like a tomb that looks so bright and shiny, inside you'll find corruption never seen..." He could definitely be pegged as a folk artist, but I think he has captured more of an audience for his stories than any other folk singer (Dylan included) because his voice and earnestness is just so arresting. The power of his original works continued up to the song "The Man Comes Around" which is a powerful romp through the book of revelations.

We had something fairly unique in Johnny Cash - here is an artist with an impressively long career whom we watched grow old. As his daughter Rosanne said, "he didn't become a parody of himself at fifty." There are other great country and bluegrass artists who are reaching similar age, such as Willie Nelson and Ralph Stanley, but they don't command the same audience and history as Johnny Cash (great though they are), nor have any of them yet had illnesses like Cash had in recent years. Other rock artists who are still recording and performing, such as the Rolling Stones, I doubt will be remembered like this. Johnny Cash and Elvis Presley are unique in history.

I went out dancing last night, although I would have preferred going out to a good quiet bar (or even a country/rock karaoke bar) to celebrate in my own way. But even at this club, there were touches everywhere. My favorite - one of the doormen had a name tag on that said, simply, "hello, my name is SUE." On two floors, they played "Hurt," off of American IV (many of the people at this club were probably familiar with the original Nine Inch Nails song). Each play was followed with somber but appreciative applause.

When June Carter Cash died in May, my friends and I all felt that Johnny would be gone in six months, knowing both his medical condition and the fact that he wouldn't have lived like he did without June. Of interest is that since her death in May, Johnny's been writing new songs and was preparing to fly out to California to record for the next American Recordings. I don't know what will be done with those recordings. There are plans to release a set of the sessions from the American Recordings (I-IV) series, called "Unearthed." It was planned to be released by the end of the year, according to this MTV news item that was put out a day or two before his death.

And finally, the song "The Man in Black" sums it up greatly: "But just so we're reminded of the ones who are held back, Up front there ought 'a be a Man In Black." We need more leaders like this.

J. Shell, September 13, 2003 05:52 PM, in Joy

September 03, 2003

I've been talking a bit lately about web form form generation and validation, especially when combined with a framework to assist in data storage facilities. It turns out there's a lot of this going on in the Python world at the moment. Here's a list of kits that I could find. This is just a list. I've only glanced over documentation or source code (via ViewCVS) to most of these.

  • Formulator is a Zope solution, and the one I've spent the most time with. Formulator's primary purpose is to define forms (usually through the web using Zope's management interface) and validate input. Formulator can be used to define the ordering and grouping of fields, and Zope's template facilities can be used to render the form and fields. For general purpose Zope use, Formulator does a great job. What I'd like to have is decent pre/post validation (ie - handling multiple fields) for the entire form that would tie into the main validation system. Formulator may be flexible enough in how it can be used to facilitate this in custom code that uses it.
  • CMFFormController seems to be a Formulator type system targeted at the CMF (a special Zope framework for content management, and the engine behind Plone).
  • FormEncode by Ian Bicking looks like it's intending to be a general purpose form/schema/validation toolkit. Ian previously worked on FunFormKit, which was meant to be used with Webware. FormEncode has some cool validation concepts. Some of these are the Compound Validators, which include a validator known as "Any", which supplies a list of validators. The first one to succeed stops the chain of validation for that data item. FormEncode looks like it's taking effort to be fairly agnostic to where its data is coming from or going to.
  • formlib for SkunkWeb. I'm using SkunkWeb on this weblog, but only very lightly.
  • Quixote's Form Framework, for the Quixote application server.
  • FormKit, for Webware. This is "inspired by" FunFormKit mentioned above. This appears to be the preferred form kit for Webware at the time being, as Ian Bicking's moved on to his more generic FormEncode system (mentioned above). FormKit claims to be better integrated into the Webware response loop and easier to debug outside of a web environment than FunFormKit.
This is just a general overview of the basic toolkits available. Most of them are specific to particular frameworks or application servers, and remain fairly open to the issues of web form generation and validation. What you do with the data beyond that is up to you.

There are other systems available that tie themselves in to data management as well - that is, they provide not only data validation and display services, they tend to be tied into one or more persistence systems as well. A couple worth mentioning:

  • zope.schema and zope.app.forms are principal Zope 3 elements. Schema are means of describing objects and are used with the zope.interface package to describe objects contractually. zope.app.forms uses the Zope component framework to look up widgets that are displayed to HTML using zope.app.browser.forms. The components in the zope.app level do all of the HTML stuff, such as generating an edit form for an object based on a Schema (Interface), and saving the validated data to the object in question. It's also automatically tied into other Zope 3 services, such as the event framework. With it, one can create content objects and their interfaces (or custom implementations of other schemas) and build a full web user interface off of that data with a few lines of ZCML (Zope's Configuration Language) to loosely bind the edit form to instances of the content object. While there's a lot that can be done automatically, there's a lot of customization that can also be applied. Stock validation doesn't seem as strong as FormEncode. A lot of Zope 3's schema system is based on ideas espoused in the Naked Objects Framework.
  • Archetypes for CMF / Plone. Archetypes seems targeted towards making custom content objects for Plone/CMF sites in a manner similar to what can be done with the Zope 3 zope.schema and zope.app.forms system. Archetypes also has a SQLStorage option to make custom objects that are managed in Zope/Plone but stored in an RDBMS in natural form. There are some interesting developments off of Archetypes:
    • ArchGenXML - generates Archetype based Plone applications/products from XMI (UML) and XSD (XML Schema) files.
    • There are fairly immediate plans to do stronger integration with Ape, a powerful abstract persistence system.
  • Silva Metadata looks to be a Zope 2 implementation of a system similar to Zope 3's Annotations system, which allows customized extension (annotation) of existing Zope object types. It uses Formulator for form display and validation. There are some interesting signs in its roadmap about the future of Formulator. Of interest is "a bunch of improvements that separate out the conversion and validation code."
  • ????. This one doesn't exist yet, but it's based on a couple of projects based on Formulator and building data storage components and chains of responsibility that span the gamut of user interface generation to data storage. Currently it's a collection of patterns. Soon it will be a Harvested Framework. What the libraries and frameworks mentioned in the first list allow is the ability to build these second kind - on top of the general form display and validation framework one can build a common framework to deal with what to do with that data - ie, a common way of displaying fields and errors, and being able to (in many cases) do automatic data saving (ie - cutting down on writing DML statements).

J. Shell, September 3, 2003 11:50 PM, in Python, Zope

September 02, 2003

I go on and on about my little SQL and LDAP Table Gateways. But there's a particularly good reason why I love them: never having to write DML (Data Manipulation Language) statements again!. In SQL, these are the INSERT, UPDATE, DELETE statements. I'm doing some work on a system that predates my enlightenment, and I'm in a situation right now where I dearly miss it - I'm having to write a simple UPDATE method that can deal with a select set of column changes to an individual row. These are the columns that are most likely to be updated by the application itself, so it's a restricted subset. I was so happy when I didn't have to worry about such things. Now I'm writing a dynamic SQL statement where I have to be careful where I put commas, etc, because some 'SET foo=bla' statements may not be there. sigh

J. Shell, September 2, 2003 04:43 PM, in Zope

While approving and publishing content for a public web site today, I came across a series of links that ultimately led me to Interchange, and specifically to a documentation page about applying discounts to e-commerce items in the Interchange system. While I applaud them for having this much documentation, the code examples on the page leave me scratching my head. For example, to apply a 25% discount to item 00-342, one writes [discount 00-342] $s * .75 [/discount]. See the problem? What does $s mean?!. Fortunately, it is documented on that page that the [discount] tag creates two variables - $s and $q, which mean respectively mean subtotal and quantity. So - why not have $subtotal and $quantity? [discount 00-342] $subtotal * 0.75 [/discount] communicates intent with greater clarity than just $s.

The documentation gets even more fun when a complex discount computation example is shown, using Perl:

[discount 00-343]
return $s if $q == 1;
my $p = $s/$q;
my $t = ($q - 1) * $p;
$t .= 0.01;
return $t;
[/discount]
This is documented as "Here is an example of a discount for item code 00-343 which prices the second one ordered at 1 cent:". It took me a while to grasp the meaning of $p and $t here. First I was thinking "is $t tax?" before remembering this is discounts we're talking about here. Perlisms aside, this code would be vastly improved by expanded variable names.

The worst part about this is - these are examples in the documentation. Is readability and maintainability just not a factor in the Perl world? I mean - the Python community jokes about it all the time, but I didn't think it was this real. It may be fine to write code like this for yourself, but as an example to show others - it sets and spreads a bad example, in my opinion.

For fun, in bad Python, the above would probably look like this:

[discount 00-343]
if q == 1: return s
p = s/q
t = (q-1) * p
t += 0.01
return t
[/discount]
See? Just as bad - just with a bit less line noise. It shows that you can write bad code in any language. For more fun, let's try this in 'good' Python:
[discount 00-343]
if quantity == 1:
    return subtotal
price = subtotal / quantity
total = (quantity - 1) * price
total += 0.01
return total
[/discount]
Even without comments (which would help this code - ie, just a docstring or comment at the top that says "if more than one item, charge one cent for the second one" would be helpful), the intent is clearer. So, when you revisit the code in four months or even a year, you at least know what you were trying to do. Trust me - it makes life so much nicer when you take the extra few seconds to give variables, methods, classes, etc, meaningful names.

Note: on the About Interchange page, they supply this caveat: "Interchange is not presented as being easy to use, easy to install, or bug-free." At least they're honest. Zope could probably benefit from this honesty up front. But still - $s?!

J. Shell, September 2, 2003 01:45 PM, in Etc, Python