Saturday, October 4, 2008

The Accordion Experience

While at the TAE in Boston, I have tried to use the accordion widget «on the spot» to organize my conference notes. I have looked up the Accordion documentation and put the code together. It did not work. After a brief conversation with Richard Worth (thank you, Richard!) it turned out that I did not read well enough into the Accordion's assumptions on the DOM structure. The documentation touches well on the «standard» cases of using lists, but it was unclear on how to use it with structure based on divs, or other elements.

In case it may someone else, here what I now understand:

Accordions being created on a jQuery object. To avoid visual surprises, each element to be made an accordion should have a set of children elements, which will become the accordion's items. E.g.:

<div id="my_accordion">
  <div>...</div>
  <div>...</div>
  ...
  <div>...</div>
</div>
<script type="text/javascript" charset="utf-8">
  $('#my_accordion').accordion(...)
</script>

My wrong assumption was that anything inside the item's <div> would become content, and a header's text just extracted. However, each item must have exactly two elements - the first one for the header, and the second one for the content. The first element needs to be queryable. The second element apparently does not have to be marked in any special way:

<div class="accordion_item">
  <h3>....</h3>
  <div>...</div>
</div>

With that infrastructure in place it is a simple call to create an accordion (add other options to taste):

$("div#my_accordion").accordion({ header: "h3" });

My next task was to allow all items to be collapsed. Since the application was to allow for easy reading of the conference notes, I wanted the items to collapse, when clicked on the active item's header, so the whole list of sessions can be reviewed. That is done with the «alwaysOpen: false» parameter, while the «active: false» parameter creates the accordion initially closed:

$("div#my_accordion").accordion({
  active:     false,
  alwaysOpen: false,
  autoHeight: false,
  header:     "h3"
});

Hope that helps someone dealing with the Accordion widget the first time.

read more ...

Friday, October 3, 2008

An Opinion on «Shawn Bentley Orphan Works Act of 2008» - open source application

As far as I know, the only way to punish for an open-source copyright infringement is via punitive damages. The owners of an infringed copyright, who opted for open-source licensing, quite often are innovative hobbyists and simply have no money to carry the legal burden unless there is a possibility of punitive damages to pay for lawyers to work on their cases. The legislation specifically removes the only way for this community to survive.

The open source licenses' value is not in a direct monetary gain for the owner, but in secured return flow of value back to the community. Such a value is impossible to express in terms of «reasonable compensation», which is the only dispute remedy suggested by the legislation. So what an abuser is going to pay, when caught? Nothing, and keep using the software? There is nothing in the bill, which upholds the licenses, set by copyright owners. If fact, the way I read it is it designed to disregard the license, if an infringing side made it look like acting in a good faith.

Open source software from individuals or small groups will have no protection and way to enforce the return flow of value. That creates an extremely lucrative ground for copyright abuse. Especially for large companies, which have a history of strong-arming and taking advantage of creative individuals.

Imagine that a copyright owner of an open-source/creative commons work of art or software deceases. Does that mean, that anyone can do whatever with his/her work? Is the license considered unenforceable anymore? If the author is not to be found does that mean, that improvements to a piece of open-source software no longer have to be returned to the community?

Please, help to DO SOMETHING about this awful development. Please, write your congressman its a public disservice legislation. Tell your friends and co-workers. Blog about it. Anything.

Thank you!

read more ...