Category: Programming

  • Managing Plone Setups with Subversion

    Great post by Matt Rohrer about how to install and maintain plone using Subversion. Lots of tips.

    Version control with subversion for nonprogrammers. By Keith R. Fieldhouse. More tips on checking in/out with subversion by Limi. Still More tips by Tom Lazar and specifically on plone’s quills. Jens Klein on how to check out plone/collective things via subversion . Just to go overboard, here’s zope’s faq about subversion. and subclipse, en eclipse plugin for subversion.

    Two other links: a crash course in subversion (chapters from a book by Garrett Rooney) and the official Subversion doc later made into an Oreilly book.
    I’m really going to rely on subversion for my new web server. I’ll be building it in the next week or two.

  • XML/Python: RSS Not Looking Too Bad Anymore

    How to Program (mainly in python) by Alan Gauld.

    XML on the web has failed by Mark Pilgrim. I discovered this when I found out one of my webhosts used a different encoding from the pages I was producing. He writes:

    if the media type given in the Content-Type HTTP header is text/xml, text/xml-external-parsed-entity, or a subtype like text/AnythingAtAll+xml, then the encoding attribute of the XML declaration within the document is ignored completely, and the character encoding is:
    1. the encoding given in the charset parameter of the Content-Type HTTP header, or
    2. us-ascii.

    I just noticed that Oreilly’s Safari offers online books by other publishers. At 19.99$ it’s still not in the affordable range (although ebook readers could help a lot with this), but it’s getting a lot closer.

    Recently I’ve taken a second look at rss readers. I use the web version of bloglines. I’m still not completely sold on it except for podcasting and things like that, but here’s one way rss really shines: putting newsgroups and mailing lists on the web(as good as, if not better than google groups). Bloglines lets you “save” posts so that they’re constantly listed as new, serving as a kind of “bookmark function.” RSS really works well for sites updated infrequently (unlike weblogs for example). One cool thing about plone was that creating an RSS for any page required practically no effort at all.


    Tips on making your HTML output from Docbook not suck
    (More tips by Lars Trieloff)

    Lorelle VanFossen writes about the new WordPress Documentation Codex. Interestingly, Plone is starting to adopt that look as well. I think in general a two column or three column list of starter topics tends to be a good home page, especially if the topic groupings stay static (the contents of these contents could be changed; that’s not what I’m talking about)

    Kurt Cagle on the new XML Generation (and how the latest batch of programmers will be different in their perspectives and methods). Kurt Cagle writes the appropriately titled understandingxml.

    Seth Godin: Small is the New Big

    World open-source travel guide. Actually, the whole concept of distributed reporting is not revolutionary; wrapping it up in a book is.

    Jeff Jarvis on how blogging is changing the newsroom

    Newsrooms need to redefine news and news gathering. They need to be open to new sources of news, including the reporting of the people they used to view as the audience: yes, even bloggers. To use our parlance today, newsrooms need to think of themselves — again — as aggregators, gathering — and sometimes packaging, sometimes not — the news their communities create.

    They also need to waste less effort, talent, and money on commodity news, the news we already know, the news we could write ourselves if we watched CSpan or CNN. If you can link to it, if the audience already knows it, why spend ever-more-precious resources redoing it? Instead, it is better to concentrate on a newsroom’s real value, reporting: journalists’ ability to ask the questions people in power don’t want asked, to be an advocate for the public to power, to get to the bottom of debates, to add perspective, to be local. Journalists aren’t the only ones who can do that, but that is still their primary value.

  • Soundblox/OpenLazo

    Speaking of what looks cool, openLazlo is an open-source xml-based application for creating flash-based animations. Soundblox, an mp3 player is one type of application you can make.

  • In Awe of Eclipse

    While playing around in the afterhours at work, I downloaded the latest version of Eclipse and the python plugin Pydev. I know a little bit of python, but hadn’t worked in Python in a while. I think I’d used Eclipse before for xml editing, and found it next to impossible to set up my development environment. Setting Up Pydev wasn’t bad; at least their FAQ was self-explanatory. The product is maintained by Fabio Zadrozny in Brazil.

    My company uses eclipse at work, and although I have not personally worked on the project, I’m sure eclipse is becoming a mature product these days, and user interface has improved considerably. As it happens, when installing the eclipse help system didn’t launch, which is probably for the best because too much documentation can sometimes confuse one irrevocably (especially if a lot of it covers Java, something I absolutely don’t need). Also, Eclipse is becoming more intuitive (or maybe my experience with other full-featured IDE’s helps me to make sense of this one).

    I can’t wait to get back into the python/plone thing. I am so out of it.

    Andy McKay has talked about the need for a plone interactive prompt and hints that an open-source product version will be available soon.

    On another note Philipp von Weitershausen has written a book about Zope 3. Often, with open-source projects, the most important thing to know about a book is its publication date (everything seems to be a moving target).

    Looking at plone.org, there are new products for ATAudio, S5 Presentations and plans for the 2.1 release of plone.

  • Make Amazon Wishlist into a Feed!

    Watchcow is an xml feed that lets you convert your amazon wishlist into an xml file. This is good, because my amazon wishlist is to my knowledge the largest wishlist of any amazon customer.

    Now the challenge is figuring out how to display the wishlist conveniently in a browser (the xml file is a whopping 1.5 mb file–you can download Robert Nagle’s amazon wishlist as an xml file here btw). But this is a nice project for my xml/xslt editor, oxygen xml editor.

    Given that pervasive wireless access in Houston is still a pipe dream, having an offline copy of a wishlist is handy when browsing through bookstores or libraries (what was that title called? How much was amazon charging?). I already have a copy of my book collection list on my PDA and a list of Gutenburg titles on my ebookwise 1150 reader.

    One thing encouraging about Amazon’s business practices is that it’s generally given free access to its APIs for third parties, so such applications become possible.

    Unrelated Note: Just a few days ago someone pointed out to me that API’s is wrong; APIs is the correct way to write the plural of the API acronym. Plurals of acronyms do not use apostrophes, contrary to what I may have thought. How embarrassing. It ranks when the faux pas I committed at JHU writing workshop when I misspelled a word. The word was “drawer.” For some reason, the 22 year old version of myself thought it was spelled “droor.” The class (led by famed novelist John Barth) was critiquing a story of mine, where I must have used the word about 20 times. Never before was my ignorance so frightfully apparent.

  • CSS For Not-so-Dumb People

    Recently I’ve been trying to add a css feature to a website and catching up on stylesheets.

    I was pretty hip with stylesheets in 2001-2 (and that’s when css was tough going with browser support). Recently I redid the stylesheets for one of my sites and found it remarkably easy to do. (Also, I’ve been enjoying the Windows only Stylemaster product which generally is a time-saver).

    (Curiously, I haven’t made any effort to make my blog stylesheets anything interesting).

    Here are some interesting finds:

  • Docbook XSL Book

    Curiously, I have no idea where I never linked to the online version of the Docbook XSL book by Bob Stayton.

    I suppose it’s only a matter of time before I buy the paper version

  • URLCleaner

    Here’s a useful urlcleaner. For those pesky ampersands.

  • Feed Validator

    Feed validator, by Mark Pilgrim and company.

  • Cleaning house XHTML Strict

    Difference between XHTML Transitional and Strict, a handy reference.

    I spent a few hours yesterday doing a few things for programming piece of mind. On my fiction project, I’ve started validating html more rigorously (even going XHTML strict instead of transitional) using my Oxygen XML editor and Visibone HTML/CSS reference sheet. While fixing things, I noticed that a tracker script includes a lot of nonvalidating crap: a target=”new” and script language=”javascript and amersands not described as an html entity.

    According to visibone, the language attribute was removed in favor of type=”text/javascript”, and according to Jeffrey Zeldman, there’s a way to swap doctypes at the top to allow target attribute in certain circumstances.

    On another note, I tidied up my style sheets for the same project. I don’t dip into css very much (especially not in my weblog), but I actually enjoy when I get an opportunity to do so. Especially now. 2 years ago I wrote a fairly simple css file for a site, and erratic browser compliance made it impossible to get it to look right. For this reason I used some tables where I needn’t have. When I tried revising it now, I found doing so was fairly painless; I think it’s because you can pretty much count on everybody having IE 6 or Firefox. Automatic updates is good for something, no?

    Looking back at my simple style sheet, I found a lot of sloppiness. I left in a lot of styles I was experimenting with, and I didn’t do much commenting, and the styles weren’t described in any order, leaving me to have to figure out what was cascading into what. Reducing clutter in css really makes it easier to see problems.

  • Catching Up

    I have a lot catching up to do. I’ll be brief.

    In the next year or so I’ll be writing short essays about music videos. Here’s one of my favorites: Fantastic Plastic Machine: Please Mr. Salesman. The yahoo music site has a good collection of vids.

    Saw Kristin Hersh live at the Mucky Duck in Houston. She was great. I got to talk to her after the show. Interestingly, Hersh was selling “demo CD’s” instead of big label CD’s. Glad some people are learning. She lets people download mp3’s for $10 per album on her website.

    I’ve been enjoying Oxygen XML Editor. I haven’t been able to get CSS to work in the browser window (I haven’t really tried though), and this editor seems more data-centric than document-centric. On the other hand, They have this nifty tree view and folding view and a way to “straighten out” the containers of data.

    BTW, it dawned on me recently that the templates for Plone bear an uncanny resemblance to XSL and XSLT.

    Now that I have a good and handy editor and validator, I’ve started checking my static webpages to make sure everything validates. It’s not easy, but far from impossible.

    Why CSS is better than XSL. Not to be outdone, Norm Walsh responds:

    One of the fundamental virtues of XSL (both XSLT and XSL FO) is that they’re expressed in XML and therefore inherently accessible to machine processing and machine validation.

    Here’s a description of how to do CSS for different media.

    Here’s a nice collection of laminated reference cards for web programming. XHTML, CSS, Javascript, Entities, Colors, Regular Expressions.(Now if only they’d do it for Docbook, XSL, Plone Classes and XSD, I’d be really happy!)

    I’ve learned a bit about character encoding. Joel Spolsky about Unicode. Here’s a good guide to character encoding issues. Here are a few of the problems I’ve been having:

    1. I’ve been typing my essays in OpenOffice and then cutting and pasting the content into Dreamweaver text editor. Royally bad idea. I’m not sure what’s going on, but Dreamweaver sets the encoding default to ISO 8859-1, and Openoffice is doing something different. The solution in OpenOffice is to choose SAVE AS, choose the file type Encoded Text file and choose the encoding you want to work with. Then, copy from it. I’ve noticed something similar with MS Word.
    2. Consistent encoding. Dreamweaver slaps 8859-1 at the top of HTML files, but I had a meta tag which specified UTF-8. How stupid am I?
    3. I was doing a global search and replace in Dreamweaver to replace the fancy quotes with boring quotes. Apparently my boring quotes were making things worse when I was trying to put things back into UTF-8.
  • Tagging and More

    Also from Caterina, a description of the semantics of flickr tagging.

    Dave Weinberger has written about it also. Here are two interesting thoughts:

    t will be fascinating to watch the social effects as people adjust their tag sets in order to get aggregated either into the most popular tags or to be segmented into smaller groupings. That is, if you want to be found when people are searching for blogs about America, you will learn to tag it with (say) “USA” and not “U.S.A.”, “US,” or “America.” And if you want to have your posts be found by people searching for posts written by members of your Dungeons & Dragon’s group, your group will make up a tag that no one else would use. How this sort of stuff occurs at Technorati depends to a large degree ? but not entirely ? on how Technorati chooses to enhance the system. Little changes will have rippling effects.

    Third, this represents the externalization of tagging. That is, Technorati is a broker of tags, not a place where you create tags. There are other important functions that could be handled externally, including the creation of thesauruses so that items tagged as “USA” get clustered with ones tagged “America” and “Etats-Unis.” The particular apps where you tag stuff can, of course, compile their own thesaursi. And, they’re likely to be compiled automatically by noticing the different tags that are applied to the same item. But having a thesaurus compiled from a superset would help smaller-scale apps cluster tagged items well and would provide additional useful information to all clustering apps. Local thesauri are always going to contain the most valuable information, but info from the aggregated thesaurus can also help. But, there will be social effects from having external thesauri. I don’t know what those effects will be, but I suspect that they’ll be significant since thesauri are about meaning across groups differentiated by meaning.

  • CMS’s vs. Blogs

    Jeffrey Veen on shortcomings in content management systems:

    Why do you insist Web sites have ?columns??

    I?ve used quite a few systems now that have the notion of a three-column layout. They give me the ability to turn columns off and on, and put ?portlets? into ?content-slots.? Where does this assumption come from? In the last two years, I haven?t built a single Web site with columns ? and these are high-traffic commercial sites. All of the markup is spit out linearly, and then styled in whatever column format we want using CSS. Yet so many content management systems bake the three-column layout so deeply into the code that it takes considerable hacking to get rid of it (I?m looking at you, Plone).

    It may be a couple of years before everyone can start using table-free layout, but why not set the precedent with your tools? Think how much easier your CMS would be if I could simply say, ?I want these features presented in this order,? and then apply a stylesheet that does all of the presentation.

    Molly on conformance to standards.

  • Quills and Monit and General Plone Grumbling

    Server Monitoring Utility: Monit.

    Quills is a portal-based weblogging product for Plone. I will be probably be using it for imaginaryplanet.org (indeed, I might be migrating this weblog to it if I can!).

    The lead developer’s weblog contains updates, along with the promise of a release upcoming next week. Speaking of which, it seems to be in the backend of the incredible publicknowledge plone site. (Here’s the section full of quill posts ).

    I’ve been grumbling lately about plone. First, I can’t tell you how many times I’ve come across error messages within plone sites. A cms shouldn’t be prone to error. Second, I really haven’t seen many good examples of small plone sites (with good usability). I’ve seen well-done corporate sites, but they have the time and resources to make it good. I haven’t seen many usable out-of-the-box plone sites. Third, commenting system is primitive. For example, it is still a nested view and hyperlinks are disabled for comments (smart for countering spam, stupid for facilitating discussion). Fourth, the conceptual model for plone just seems to get harder and harder. Getting templates and macros and products to work together just seems complicated (to say nothing of security or workflows). Part of the problem is that the software’s management interface, while powerful, just doesn’t make it easy to find the most important configuration elements. It took me a good while to figure out where the templates were.

  • Debugging Zope and Python

    Debugging Zope via the command line. Also, boa constrictor is a crossplatform python IDE with zope support (More about boa-constrictor).

    Shane Hathaway (a blogger ) and author of several zope tools including zope, DCWorkflow and others, has a product, Verbose Security, for use with BoaConstructor. Shane has been fiddling around with Zope3 and seems to have good things to say about it.

    While I’m at it, here’s some articles about ZopeUnitTesting and a ZUT Testing. (There is some plone information about it as well).

  • Bass Ackwards

    Dave Astels on Why Your Code Sucks.

    OK, so you decide to add tests to your code. That typically isn’t so easy. The odds are that your code wasn’t designed and/or implemented to be easily testable. That means you will have to make changes to it to make it testable… without breaking any of it (this is usually called refactoring these days). But how can you quickly and easily tell if you’ve broken anything without that comprehensive set of fine grained tests? Tricky.

    It’s even trickier than that. If you take the approach that you’ll write tests for all your code after you write the code, you have to go to extra effort to try and design/write the code to be testable.

    Maintaining an adequate level of testing when writing tests after the code being tested takes time and planning. And if you have to do additional work to make your code testable… well… that sucks.

    Writing tests before you write the code means that the code is testable by definition. If you work one test at a time, you reap even more benefit, as each test only requires incremental changes to code that you know is solid.

    This parallels an instructional design concept about evaluation. It says you need to devise your evaluation methods before you actually design your lesson. Bass-ackwards, but the more you think of it, the more it makes sense. Actually, this applies to learning tasks where it is easy to demonstrate mastery through behavior and where the criteria are clearcut. For more open-ended types of learning (writing, cultural studies), the instructional designer ought not to define how to measure student success. Why?

    When I taught a literary theory class in Vlore, Albania, my students would regularly blow me away with their answers/analysis of literary questions. I was the smart teacher; they were the naive students; the problem was that my preconceived notions of how theoretical questions needed to be answered were ridiculously ossified. I found myself taking more notes of what my students were saying that they were.