Older blog entries for zanee (starting at number 198)

Plone vs. Django

There seems to be a reoccuring fad of some sort comparing Plone vs. Django in regards to frameworks and content management systems. I'm a little confused as to how this is even possible but i'm going to put this safely to rest so that we can all move on.

Plone and Django are not comparable because they are two different things. If you are talking to someone and they are comparing Plone and Django to each other in any fashion you may want to inquire how much experience this person has as a programmer/web consultant or whatever they are calling themselves.

Plone is a content management system through and through. An application built upon the Zope stack which for all intents and purposes you can compare to the familiar Lamp stack. It's the most mature fully functional and featured opensource content management system on planet Earth. It comes with cache, security, workflow, process management, revision control, one could go on. If you need to manage some content; whatever it maybe. That is what Plone is good for.

Django on the other hand is a web framework/toolkit that allows one to build a rapid application using Python. So as far as a content management system goes you'd have to program all of the above features yourself. There is a project called Django-CMS which does exactly that but even in cursory review of the website it doesn't have 5% of the features of Plone.

So can you compare Django and Plone? No. The two are completely different things. I guess you could compare Plone to Django-CMS but seeing as it's in its infantile stages that would not be fair. Anyway, in short, people comparing Plone vs. Django? Idiocy.

Share/Bookmark

Syndicated 2010-06-01 18:12:10 from Christopher Warner » Advogato

Steve is right.

Let me note. What you are about to see is unedited. I've collected the window but have a full picture available.  Note, nothing is running on this machine with the exception of some background processes. Chrome was fully quit. I came home to a machine that was chewing disk and slow. This is on a 2 x 2.8 GHz Quad-Core Intel Xeon Mac Pro with 6 GB of 800 MHz DDR2 ram. Steve is right. Anyone can say whatever they want to me at this point, my mind was already made up before Steve. The factual evidence continues..

Image of Flash failing

Flash failing

Share/Bookmark

Syndicated 2010-05-27 22:37:18 from Christopher Warner » Advogato

Writing good documentation and presenting your work.

I'm going to make this short. Writing good documentation is extremely difficult which is why it rarely happens. When it does happen you get a readable article, book or column that reaches you in its intended fashion. Whether it be to teach or inform it is a practice to satisfy the readers hunger for which they are reading said article, book or column in the first place. So imparting with knowledge in a sane and coherent fashion is an art that I feel has simply been lost to convoluted grand-standing and the feeling that one should not have to "dumb-down" a topic in order to reach the reader. There is the argument that there are levels of scope in which one needs to have a full understanding before they can begin to understand the terminology. It's valid in some corner case where one would expect that understanding to already exist but if the documentation doesn't take that into account. It is not accessible and needs to be written again.

This is a problem specifically with science but more-so in regards to technical manuals and such. Some of the smartest people still have problems writing ACCESSIBLE documentation. So here are some guidelines you can follow to make your documentation more accessible so that it satisfies the hunger of your reader.

  1. Outline and detail every step no matter how mundane in as precisely a way as you can. (this involves a lot of work you may deem pointless like typing out the command cd /directory)
  2. If a topic needs another piece of documentation, prevent straying away from the main course of the documentation. It's safe to note that the topic you are referencing or referring to needs an adjoining piece of documentation or has another piece of documentation that is referenced in biblio or towards the end of said documentation.
  3. Your reader maybe your peer and you may suspect this peer is as avid and learned on a topic as you yourself are. This is not always the case so NO acronyms if you can help it. For example, referring to HyperText Transfer Protocol in it's full expanded verbiage every other paragraph helps.
  4. Concepts of terse knowledge should be kept short and simple. There shouldn't be copious amounts of detail before another paragraph or chapter. I see this a lot.
  5. You may need more than one book; don't try to fit everything in one book. Let your reader take a break.
  6. There is no such thing as DUMB-DOWN. There is such a thing as copious amounts of detail. As a reader, I prefer the copious amounts of detail, again, as precise as possible. If I already know what I'm looking at I'm free to skip over it, please don't determine that for me. Obviously I'll note that you don't need commentary such as "please turn the page" as that is just you being stupid.
  7. Do not waste your readers time. If they can't follow your steps or create a picture with the words that you are writing. You are doing it wrong.
  8. DO NOT LOOK TO YOUR PEERS FOR REVIEW FIRST. Hand your book or topic to someone who has absolutely no idea what you are discussing. If they can understand or at least halfway follow some of the more terse conceptual pockets; THEN hand it to your peers for review. If they can also understand it, you've done a good job.

None of the above is simple but if you follow some of these guidelines it will help you. I can guarantee at the very least that I will most likely have very little to say in regards to your documentation, article, book etc. Well, at least in regards to readability.

Now onto presenting your work. Lately, over the course of the last year. I've consistently seen people work hard, work on papers, work on research with the understanding at some point that this data, research and such will be presented to an audience. They do all the hard work, and then arrive to present 5 minutes before hand confident in their work. Only to have all sorts of niggling issue with projectors, laptops, etc. This seems to be almost a fad, at my place of employment, at research facilities, at school, at the library. I see it, over and over and over. The only time where I've seen a truly affected issue is when a project bulb blew and this gentleman was so prepared he had a pico-projector and just continued on. Every other issue could have been solved if the person showed up an hour or so before their presentation.

Having your peers sit around like idiots while you try and fiddle with a projector is INSULTING. It is the difference between a brilliant presentation and a mediocre one. It also affects you as the presenter when you are trying to fiddle about with frustration, anxiety and heaven forbid the lack of presentation or rescheduling due to hardware failures. Here are some guidelines in order to look like a king and have rounds of ovation in your name.

  1. Once you feel you are ready to present. Present infront of a crowd of 0. Walk through your presentation several times with yourself.
  2. Avoid Powerpoint except to display visual images and bullet points. If you are reading directly from PowerPoint then why are we having a presentation? Just send the PowerPoint file to everyone and don't waste the time.
  3. TEST the presentation where ever you plan to host or present. Check the room or auditorium out, ask about web cameras, microphones (wireless,wired), lighting etc. ALL of it is important
  4. Do the above AGAIN. Walk through it all yourself if you have to
  5. Arrive EARLY to your presentation. I don't care who you plan to present to or for. Be there early.
  6. TEST AGAIN
  7. Treat your audience to a show of all your hard work. Bask in the glow of the ovation.. Answer 2-3 questions. Take off the suit tie and go home.

If you follow the above guidelines I can assure you that you will have a great presentation. Where things seemingly run smoothly to the audience. Little did they know you spent many a hour crafting your presentation specifically for them. At the very least I can guarantee that if you hold future presentations you won't look like an idiot infront of your audience; or at the very very least, you won't look like an idiot infront of me.

Share/Bookmark

Syndicated 2010-05-20 17:07:22 from Christopher Warner » Advogato

Creating a custom template for a Plone content type

So in the last example, Creating a Content Type for Plone 3.x, I provided steps for creating a content-type in Plone. The feedback has generally been positive and those steps can also be found on Plone.org (I try my best to keep both sync'd). What's the next step though? You've got your content-type and you've entered most of your data but now you want to display it in your own template. The number one thing I have heard from people is that they can't make Plone look like anything except Plone without extreme duress. Unfortunately, this is simply not true.

So, for example how do we get Plone from looking like this:

A Stock Plone install using Sunburst theme

To looking like this:

I stole this theme from oswd.org the author is Christopher Robinson

The answer is a concept known as Browser views. Now, there are two trains of thought here. One is that you want all of the default Plone interface to look a specific way. 9 times out of 10 that isn't the case. You probably don't want to theme your content management system the same way you don't go around changing the theme to wordpress/movabletype/drupal in edit mode. Some people do have a need for this but you probably aren't one of them.  The other train of thought is that you'd like for the content that you enter to be displayed in a certain visual context depending on where it is displayed. Lets be realistic, you will probably be displaying this primarily on a web browser but you may decide you need several different renditions depending on context and platform. So you may need a mobile version of the same content etc. Let us hop on this train of thought for a minute.

The first thing you'll want to do is change into the browser directory, so for example that would be something resembling:

/Applications/Plone4/zinstance/src/plone.dvd/plone/dvd/browser

We are going to create the file web.py because this view is for the web primarily. If we wanted to lets say create a mobile view or page we could make mobile.py or whatever we want to create a view for. In our case though we are just making an html page right now.

In it we are going to put the following:

A view of the Html Class

The HTML Browser View SubClass

This creates a class with methods that we can later access directly from our template should we wish to provide some custom functionality. It isn't explicitly required but unless your content-type is extremely simple or you can use default Plone methods for content-objects. You will most likely need it at some point. In the above example we simply return the string "Some people are still dreaming." when we call the still_dreaming method from the class Html which subclasses BrowserView.

That created and saved.  Let us now create our template. In this case I stole the following theme located on oswd at http://www.oswd.org/design/preview/id/3537. I unzip this into my directory and simply rename index.html to web.pt (where .pt stands for page template).

Here, a discussion on Zope Page Templates is required but I plan to save that for a larger document at some point and will replace this paragraph with that. In the meantime please visit this link.

So we want to take information from our content-type and display it on this template. Here is how we go about it:

Zope Page Template for our DVD Content Type

ZPT

Lets start with line number 7. It pulls in a stylesheet named dvd.css which houses all of the style for our html page including images that are related to the overall design. There are a couple of different ways to get Plone to recognize and use these type of files but we are going to go with the easiest way for now.

In your Plone site proceed to the ZMI (Zope Management Interface). In our example case it's going to be http://localhost:8080/cwarner/portal_skins/custom/manage and look like the following:

Plone Skins Custom Tool - Zope Mangement Interface

Plone Skins Custom Tool - Zope Mangement Interface

This is Plone's Skin Tool which will allow us to put our own Custom files/images etc. The only thing one should be cognizant of is that these files are available from anywhere in a Plone context. (There is another, more clinical way to do this via the filesystem that I will describe but in order to keep with the concept of Browser views alone I will disregard it for now and add it as a note later). Once here we select the type to add in this case I had the 3 images to add so I added them as images and two css files which I added as the file type: File.

At line 29 and 30 we have the title of our DVD Content type and the description. You'll see that I refer to these via context/title and context/description. The context paradigm is as you would expect. It will display the title of whatever specific context we happen to be in. In this case we are actually working with a dvd content type with the title 'The Pursuit of Happiness". So context/title displays whatever the title of the dvd is named. The same follows for lines 35-39 where we display the Publisher, Length, ISBN, Rating, and Color. Notice that the attributes are named exactly what we called them when we created our content type.

Now, lets take a look at line 42 which has the following "view/still_dreaming" as it's content descriptor.  When displayed in the final template we see that it indeed does work and returns the line "Some people are still dreaming" under the Comments section.

Next up! Let us plug this all together with some ZCML (Zope Component Markup Language) and try it out. Open the configure.zcml file located in your browser directory. We are going to add a section for our new template page and view and it should resemble something like the following:

configure.zcml setup for browserview

configure.zcml setup for browserview

Lets discuss some of these properties

  • Line 8, describes that our browser view is in-fact a page
  • Line 9, describe that our our view is applied to a specific interface, in this example we use the greedy operator so this will work with any interface.
  • Line 10, is the actual name of our view. In this case I picked a name that describes what our view type is but this can be anything
  • Line 11, describes where the view class is located. In our case it's in the web.py and in the class Html; hence .web.Html
  • Line 12, describes where the actual template is. Again, in our case it's web.pt where .pt stands for page template
  • Line 13, describes who has permission to see our view. In most cases this will be zope2.View

Once this is complete you can save the file and because we've wired everything up from our previous example you should be complete! If plone is started, restart it and you can test it with some dvd content that you've already created. In our case the url we would visit is: http://localhost:8080/cwarner/dvd/the-pursuit-of-happyness/@@html

Notice where we apply the double at (@@) before html. We could also just use the following uri http://localhost:8080/cwarner/dvd/the-pursuit-of-happyness/html. The double @@'s just explicitly tell Plone that we are requesting a view. Now that you are complete we could have Apache, Varnish or even Plone rewrite the url to something a little more pretty if we want. After this run you should be able to use a myriad of different templates and configurations to display your content on whatever device or platform you want!

Share/Bookmark

Syndicated 2010-05-12 21:10:02 from Christopher Warner » Advogato

Social media? Industrial Revolution?

You know; when people start comparing social media to the industrial revolution I have to laugh. In-fact, what is social media? I mean really? See, with the industrial revolution people actually CREATED things. They manufactured new products, goods and services. Everyone was running to invent something that was actually physical. That could aid in the change of a persons day-to-day activity and problems. Social media on the other hand has done none of that. It hasn't even streamlined the idea of connecting people. As far as phones go? They worked a whole lot better when I wasn't getting dropped calls. I'd have to guess that my old Motorola Startac was the best cell phone invented. My iPhone? I get a CALL FAILED if i'm on the phone longer than 10 minutes in some areas. Anyway, with the exception of publishing content online. Twitter, Facebook and anything else that fits in that circle hasn't done much to revolutionize anything. Really, if it all went away tomorrow how would I be affected?

Yeah, I can keep in contact with my outer circle of friends on a regular basis. Maybe I can get some help with a problem or find an interesting way to cook a pancake or something. Beyond that? Social Media isn't shifting anything. It's just where the money is at right now and comparing it to the industrial revolution? Idiocy.

The organization of information at its core is a problem but social networks don't help that. What you are now seeing, or rather, what you are now being fed is another idiot bubble. The reality is this, if one isn't physically creating, or at the very least making gains toward a greater goal in some fashion that betters the human condition in some positive way. Whether it be entertaining, or researching a disease or some such. If everyone is sitting around playing Farmville and pressing thumbs up on photos for a living. If all our scientist are spending time trying to figure out how to build platforms to play games or entertain. We simply have a problem. Seriously, there are simply too many real life problems that haven't been solved for society or humans on the whole as a species to neglect.

So lets recap a bit here. What came out of the Industrial Revolution? Planes, Cars, Telephones, Rocket Science, Labor laws, numerous vaccines etc. These are things you use every single day; they empower you and better the human condition.

Hopefully at some point as a nation (I live in the USA) we can get back to manufacturing and making things that aid not only in our well-being, but also into the discovery of new science and understanding of our environments, communities and selves. So that when we do decide as a species to devote our efforts to "Social media" it is a fair distraction.

And please, don't get me wrong. I like playing games! Facebook and Twitter have been great tools for me in regard to keeping in contact with people. Especially to that extent. However, past that? If they disappeared tomorrow. It would change very little in my life, very little. On the opposite side of the spectrum. If cars disappeared, or planes disappeared. It would change life on planet Earth as we've become accustomed.

So if I referred you here, via link it's because I'm most likely sick of hearing about Social Media, Web 2.0, Google Buzz, some crap Drupal project you think i'd be interested in, etcetera. It actually sickens me that whilst there are "startups" that have been founded in the interest of finding cures for disease and better viable and renewable energy sources. That receive no funding. There is a huge rush on "social media".

So with that i'm going to type this as bluntly as I can get the point across because I'd like to conclude. Social media is in no way comparable to the industrial revolution. Stop promoting it as such and you know what? Think about what you are doing for a living. If you introduce yourself as a Social Media entrepreneur, you may as well have told me you're a Bullshit Artist. In-fact I'd prefer you say that, because at least you'd know it.

Share/Bookmark

Syndicated 2010-05-11 23:59:19 from Christopher Warner » Advogato

3 May 2010 (updated 3 May 2010 at 21:39 UTC) »

Plone Dexterity/Zope/Bluebream Fields Reference

Dexterity uses zope.schema.interfaces for its fields reference. Which means that technically, this documentation as of current is also relevant for Zope3/Bluebream developers explicitly. Also, please note the following documentation follows the beautifully structured organization (in table format) on Archetype fields for Plone by Mikko Ohtamaa located at the following url: http://plone.org/documentation/manual/developer-manual/archetypes/fields/fields-reference. It also includes some of the default apidoc that is clearly useful which is currently copyrighted to the Zope Corporation and subsequent contributors. As well as bits from Chapter 8 (Zope Schemas and Forms) from the Zope 3 Developer's Handbook written by Stephan Richter. Including obvious addition and compilation from myself, Christopher Warner. It follows zope.schema.interfaces version 3.6.0 as of today April 30, 2010. I should also note that I plan to follow where ever Dexterity and Plone lead so in the future the idea that this works with everything may, indeed, change.

Unfortunately, this documentation is required as the primary recommendation "For a complete listing of the schema/field API, see the API documentation tool at http://localhost:8080/++apidoc++ or see the zope.schema.interfaces module". Doesn't provide a good enough web reference for the budding Zope/Bluebream and/or Plone developer. The following url; http://docs.zope.org/zope3/Code/zope/schema/_field/ is a bit more helpful. However it's a pain to traverse or see ready made examples. So, I need a decent formatted reference that I can readily refer to in printed format for myself. The below will be a WIP (Work-In-Progress) until it meets my needs, so if you see an error or want to provide an example please don't hesitate. Summarily, the reader should expect a corresponding widget reference in the near future. Last but not least, the following has also been provided to you by the Institute for the Study of the Ancient World @ New York University since I am here at work right now.

These attributes are common to nearly all fields. Field-specific attributes follow, and are listed by field. Particular fields have different defaults, types and some other specialized attributes.

<caption><h1>Common Field Attributes</h1></caption> <tbody> </tbody>
Name Type Description Possible Values Default
bind method The name of a class method that returns a copy of the field which is bound to context.

The copy of the Field will have the 'context' attribute set to 'object'. This way a Field can implement more complex checks involving the object's location/environment.

Many fields don't need to be bound. Only fields that condition validation or properties on an object containing the field need to be bound

An object from Plone you are working on; for example, context.Object None
title TextLine A short summary or label of the field which is used when displaying the corresponding field widget. A title for the fieldname, for example; "Firstname" None
description Text A short description of the field used for ToolTips and advanced help. "This is the first name of our User" None
required Bool This is a bool that tells whether a field is required or not. "True or False" or "0 or 1" True
readonly Bool This is a bool that tells whether the field is readonly or not if true the field's value cannot be changed. "True or False" or "0 or 1" False
default Depends on the field The default value may be None or a legal field value "None" or another "Field"
missing_value Object The missing_value exists if input for the Field is missing, and that's ok "None" or another "Field"
order Int The order attribute can be used to determine the order in which fields in a schema were defined. If one field is created after another (in the same thread), it's order will be greater. This is not normally set manually, since it is automatically assigned when an interface is initialized. The order of the fields in a schema is by default the same as the order of the fields in the Python code. "1" or "2" or "3" Required, Read-Only, Automatically Generated
constraint(value) method Checks a customized constraint on its passed value argument. You can implement this method with your Field to require a certain constraint. This relaxes the need to inherit/subclass a Field when you can add a simple constraint. Returns true if the given value is within the Field's constraint. Example here
validate(value) method Validates that the given passed argument is a valid field value. Returns nothing but raises an error if the value is invalid. It checks everything specific to a Field and also checks with the additional constraint. Example here
get(object) method Gets the value of the field for the given object argument Example here
query(object, default=None) method Queries the value of the field for a given object. Returns the default of None if the value hasn't been set Example here
set(object, value) method Sets the value of the field for a given object. If the field is readonly raises a TypeError Example here
<caption><h2>ASCII</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
ASCII Field This is a field containing a 7-bit ASCII string. No characters greater than 127 (DEL chr) are allowed. For a full list of available characters please visit the following url: http://www.unicode.org/charts/PDF/U0000.pdf "This is an ASCII string of characters\n" ASCIIWidget
<caption><h2>ASCIILine</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
ASCIILine Field This field is the exact same as the ASCII field with the exception that it strips newlines "This is an ASCII string of characters" ASCIIWidget
<caption><h2>Bool</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Bool Field A Boolean Field provides a default bool type of T or F, 1 or 0, Yes or No etc None, T, F None, T, F BooleanWidget
<caption><h2>Bytes</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Bytes Field A Field containing a byte string whose value can be constrained by the length operator. It's important to note that the byte string is in your default locale and that you made need to decode from that locale depending on your use case Byte String, "This is a default-locale byte string\n" BytesWidget
<caption><h2>BytesLine</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
BytesLine Field Same as a Bytes Field with the exception that this strips newline characters. Byte String, "This is a default-locale byte string" None BytesWidget
<caption><h2>Choice</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Choice Field A Field whose value is contained in a predefined set. Either with a Source, ContextSourceBinder or BaseVocabulary object that provides values for this field. Or a TextLine value None ChoiceWidget
<caption><h2>Date</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Date Field A field containing a date 04/05/2012 None DateWidget
<caption><h2>Datetime</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Datetime Field Date and Time field, which takes the Date and time, to learn about datetime values please read the following PDF: http://dotat.at/tmp/ISO_8601-2004_E.pdf DATETIME None DatetimeWidget
<caption><h2>Decimal</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Decimal Field A Field containing a Decimal 1.23 None DecimalWidget
<caption><h2>Dict</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Dict Field A Field containing a conventional dict. The key_type and value_type fields allow specification of restrictions for keys and values contained in the dict. dict = {'one':1, 'two':2, 'three': 3, 'four': 4} DictWidget
<caption><h2>DottedName</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
DottedName Field Derived from the BytesLine field, the DottedName field represents valid Python-style dotted names (object references). This field can be used when a valid and resolvable Python dotted name is required. DottedNameWidget
<caption><h2>Float</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Float Field Field containing a float value 123.456789 None FloatWidget
<caption><h2>FrozenSet</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
FrozenSet Field Field containing a value that implements the API of a conventional Python 2.4+ frozenset set = (this, is, a set) None FrozenSetWidget
<caption><h2>Int</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Int Field A field containing an integer value 12345 None IntWidget
<caption><h2>Id</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Id Field A field containing a unique identifier that is either an absolute URI or a dotted name. If it's a dotted name, it should have a module/package name as prefix. http://cwarner.kernelcode.com/uri OR module.package.dotted.name None IdWidget
<caption><h2>Len</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Len Field A field requiring its value to have a length. The value needs to have a conventional __len__ method. 25 None LenWidget
<caption><h2>MinMax</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
MinMax Field A field requiring its value be between a minimum and maximum None
<caption><h2>MinMaxLen</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
MinMaxLen Field A field requiring the length of its value be within a range None
<caption><h2>Object</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Object Field A Field containing an Object value Object None
<caption><h2>Password</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Password Field A Field containing a unicode string without newlines that is a password password = '12345' None
<caption><h2>Set</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Set Field A Field containing a value that implements the API of a Python 2.4+ set. None
<caption><h2>SourceText</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
SourceText Field A Field containing the source text of an object None
<caption><h2>Text</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Text Field A Field containing a unicode string "Please make all of your strings unicode\n" None TextWidget
<caption><h2>TextLine</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
TextLine Field Same as a Text Field except it strips any newlines "Please make all of your strings unicode" None TextWidget
<caption><h2>Time</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Time Field Field containing a time 12:30 None TimeWidget
<caption><h2>Timedelta</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Timedelta Field The difference between two dates or times None TextWidget
<caption><h2>Tuple</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Possible widgets
Tuple Field A Field containing a value that implements the API of a conventional python tuple Tuple; 1,2,3 or 'a', 'b', 'c' None TextWidget
<caption><h2>URI</h2></caption> <tbody> </tbody>
Name Type Description Possible Values Default Widgets
URI Field A Field containing an absolute Uniform Resource Identifier Valid URI; http://cwarner.kernelcode.com/index None BytesWidget

Syndicated 2010-05-03 20:43:23 from Christopher Warner » Advogato

Update

Updated the latest PyCurl CVS[1] with reference count/setup patches. Hopefully for all the distro maintaners that have the unfortunate job of maintaining separate patches. You should be able to get rid of those upon release. Cleaned up the website[2] a bit so url's actually work now and such.

I spoke a little bit about the future of FacultyStaffDirectory with Cristopher Ewing so hopefully we see more work from me here. At least to the extent that I have to maintain the package at my place of employment, it only makes sense. An exploratory branch is to be opened and I'd love to be down at UPenn for a sprint during the Plone East Symposium. Obviously on the condition that we get something in a repository somewhere and it's starting to shape up i'll make my way down there.

There's some other tidbits i'm forgetting actually. I'm behind on email severely but that's nothing new. If I haven't responded and it's been a couple of weeks now please resend. Also, truly i'm not really following linux development of the kernel anymore. So i'm probably the wrong person to ask right now questions about anything involving that sort of work. My TODO list is looking more stacked than usual etc.

[1]: https://sourceforge.net/scm/?type=cvs&group_id=28236
[2]: http://pycurl.sourceforge.net

Share/Bookmark

Syndicated 2010-04-28 18:43:43 from Christopher Warner » Advogato

17 Apr 2010 (updated 17 Apr 2010 at 19:29 UTC) »

Hit&Run; patching

I keep coming across patches from random individuals on these here tubes with names like anonymous and NONAME. Posted to sourceforge and other places, why in Gods name sourceforge still allows this is beyond me. Sending random patches to an author or maintainer that you have a working relationship with is one thing. For instance if I receive a patch from lets say Daniel Lai for something. I've been friends with that kid since elementary school I'm aware of his mentality and don't really need to be concerned about patch application. Do you know Daniel Lai? Probably not. Do I know him? Yes. Do I know you? No. Technically, contacting through Sourceforge or some other online vcs repository would generally work if people actually checked their email they registered with. Others don't do this and I have just coined a term for these type of people, Hit&Run patchers.

A Hit&Run patcher is someone who sends you a patch with no relevant information about the patch. Usually by email but also by just posting a patch to a project website somewhere in a corner with no other discernable information than the patch itself. If one is lucky an obscure username like 'asdf1234' or 'Anonymous' is left with the relevant patch. Usually these are small patches but every once in a while a large patch is left. This is usually a bad thing as then you the maintainer of the project have to apply the patch. Summarily then figuring out what exactly it is doing. 9 times out of 10 it's formatted incorrectly and needs various correcting. If you are reading this definition you've probably received a Hit&Run patch. You should feel free to put it on the back-burner and attend to those patches that have been properly described.

Being a Hit&Run patcher is akin to someone slapping you in the face rudely with an answer to a question you've simply never asked. "*SLAP* Here's an answer bitch, 42, try figuring out what the question is.. SUCKKKERRRR". It's just wholly unacceptable social behavior and should be tolerated by no one!

So, yes. I have done this myself, fixed something and just send the patch from some random internet cafe in the furthest most inhabited island-right in the Atlantic Ocean. Normally to whatever email that resembles maintainer or author. I will flog myself later. This behavior however is unacceptable! Certainly practicing being a Hit&Run patcher means I should not expect my patch to be applied. Or if it is applied I should expect it will take more time than is reasonable as the maintainer tries to figure out the question to his/her life, the universe and then this anonymous patch. Really, my only complaint should be with myself as certainly this would be fine. Well, if not for me wanting my patch applied to trunk.

So what have we learned? When one submits a patch as anonymous it is simply a really bad way to go about getting said patch accepted. There are a couple of things that are just formally required for kind, civilized society to continue existence. These things primarily for tracking, accreditation and communication purposes.

  1. A working valid email address. In-case one needs to be contacted about the patch or commentary.
  2. A valid name. Even if it's just a handle; so the author or maintainer may attribute credit for said patch

Everything else can be negotiated but at the very least the above two items are absolutely required. What would help even more is discussing your patch and what it does in a sane rational manner. Something along the lines of "This changes XYZ in X function/class/method/whatever and achieves X functionality". Also, why you feel your patch should be applied as in "This will help users in this corner case for which no current functionality exist" or "This fixes a bug or security hole based on the samples that I have provided". All that said it makes the life of the maintainer or author of the package so much more pleasant! When the patch comes with the above material it's simple to look at the code or patch and say. "This person knows what they are doing, they've provided a valid patch that adheres to the functionality described and it fits within the guidelines of the project; they've provided all needed facets. I've spoken with them, there's nothing left to do but apply the patch for cut in a new release". Anything else is barbaric.

Next time you come across a Hit&Run patcher feel free to relay them this link in whatever forum they've posted their patch.

Share/Bookmark

Syndicated 2010-04-17 18:58:51 from Christopher Warner » Advogato

Relations and FacultyStaffDirectory for Plone4

Here is a patch to get Relations working with Plone4.
Here is a patch to get FacultyStaffDirectory working with Plone4. You will need to install Kupu; whenever I get around to updating it to TinyMce i'll provide a patch for that. In the meantime let me know if there are any problems so I can update. Cheers!

[1]: http://dl.dropbox.com/u/5510475/relations.plone4.patch
[2]: http://pypi.python.org/pypi/Products.Relations
[3]: http://dl.dropbox.com/u/5510475/facultystaffdirectory.plone4.patch
[4]: http://plone.org/products/faculty-staff-directory/releases/2.1.3

Share/Bookmark

Syndicated 2010-04-12 20:53:55 from Christopher Warner » Advogato

Products.membrane patch

If you are using Plone4 and need membrane you are probably aware that it doesn't work. Here's a patch that fixes it, please vet. If you have problems please let me know. This is already sitting in the ticket system for review.

[1]: http://plone.org/products/membrane
[2]: http://dl.dropbox.com/u/5510475/membrane.patch

Share/Bookmark

Syndicated 2010-04-09 21:00:35 from Christopher Warner » Advogato

189 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!