Steve Hannah: This week

Web Lite SWeTE: Simple Website Translation Engine

May 5, 2009

Host-alert.com

Filed under: Work — shannah @ 9:08 am

Just set up server monitoring with host-alert.com to alert me when my server goes down..

April 20, 2009

Why piracy must be stopped

Filed under: Work, Software Development, News — shannah @ 4:15 pm

I wrote this in response to a number of “pro piracy” or “piracy rationalization” comments to a CNN article:
http://scitech.blogs.cnn.com/2009/04/20/a-turning-point-for-online-piracy

This appears to be a culture war, and one that is being lost - and will eventually cost us dearly. Many of these comments are consistent with my anecdotal experience with friends and acquaintances. People who are involved in theft, be it digital or material, always try to rationalize their behavior. Nobody actually believes that they are a bad person. I have known people who earn a living by stealing car stereos. Their justification will generally include such points as “insurance will pay for it - and big insurance companies deserve to be robbed..”, or “the guy who owns the car is obviously rich and can afford to get a new stereo”. Either way there is some justification or rationalization that allows the thief to sleep at night.

Digital piracy is no different. There seem to be many well-articulated arguments to justify digital piracy, but all seem to predicated on the assumption that since “stealing” digital content does not deprive the original owner the content, it isn’t really like stealing at all. You wouldn’t steal your friend’s car because then your friend would be without a car (and you would be without a friend). However if such a thing as a car replicator existed that allowed you to duplicate your friend’s car for free, then you probably wouldn’t think twice about “replicating” your friend’s car.

So for pirates who otherwise are not thieves, it seems to boil down to an internal rejection of the notion that digital piracy is, in fact, theft. Fair enough. It is different enough from material theft that we might as well distinguish it from material theft and give it a different name. So piracy is not “stealing” it is simply “piracy”.

Now that we have distinguished it, let’s look at some of the implications of piracy.

1. If a product is freely available via piracy, and in our culture, piracy is considered OK, then anyone who decides to “purchase” that product is really engaging in a form of charity because they believe in the cause of the product or the person who created it. This is why 10 years ago you thought it was OK to pay $20 for a DVD movie (because you were purchasing a product), but now you think that $20 is a rip-off, because you are now engaging in $20 or charity - more difficult to justify (people spend up to 10% of their income on charitable donations, and the other 90% on themselves - by the same formula you’d think that a pirate who likes a movie would be willing to donate $2 to the movie-maker, even though he would have been willing to purchase it from the movie maker for 10 times that).

2. Based on the economic assumption that people are inherently greedy, most people won’t choose to “purchase” a product when they can get it for free.

3. The marginal value of any product that can readily be pirated will approach zero.

4. At a value of zero the product is not worth making, so the supply of good digital products (e.g. music, movies, software, e-books) will also approach zero - you won’t be able to get them anymore.

If, as a culture, we want to preserve our rich climate of art and ideas, it is imperative that we address this issue. Simply lowering prices to reflect what “pirates” perceive as reasonable prices would result in artificially low prices (because a pirate’s perceived value of content is based on how much he would donate out of altruism, not how much the product should actually be worth to him). If we completely eliminated piracy, only then could we find out what a digital product is really worth. If prices are too high, people won’t pay them, and they will come down. If prices are too low so as to deter artists from producing product, then prices will go up until they reach equilibrium.

They cannot reach equilibrium as long as there is a free alternative to every digital product.

Attempts such as Apple’s DRM are certainly a step in the right direction, but have been met with much resistance from the “pirate” community, as they want the ability to copy anything that they buy freely. Unfortunately we’ve seen that people are not responsible enough to handle this privilege, so it is unrealistic to think that any solution without some form of DRM will solve our problem and produce a proper equilibrium.

Given the facts and the implications of those facts, it is imperative that we proceed with whatever reasonable acts are necessary to curtail piracy. It may not be stealing, but it is still bad for society.

November 25, 2008

Replacing Scriptaculous/Prototype with jQuery

Filed under: Work, Software Development — shannah @ 4:34 pm

I have used Scriptaculous in the past to sprinkle little bits of UI magic into Xataface. Specifically, I have used it to add collapsible sections, sortable sections (via drag-and-drop), and sortable tables (also via drag and drop). These worked great! The Scriptaculous library was a bit bulky and it made the initial page load time a little bit longer, but the result was worth it.

Unfortunately I have started to run into problems with Scriptaculous interfering with other scripts on the page. Scriptaculous is built on the Prototype.js library which adds a number of handy methods and attributes to the built-in javascript types, like objects, arrays, DOM Elements, and strings. As a proof of concept, this is great as it shows off the dynamic features of the javascript programming language. However this can cause problems with scripts that count on the results of the default behavior of these built-in types.

For example, I have made use of Kevin van Zonneveld’s php.js library which provides pure javascript implementations of familiar PHP functions. One such function is count() which is supposed to return the number of elements in a PHP array. In Javascript, this function can either take objects or arrays as a parameter in order to provide the closest possible behavior to its PHP counterpart. Essentially, all this function does is count the number of elements in the array (or object) and return the result as an integer. Unfortunately, after including the Prototype.js library, all objects now have a number of default properties and methods whether you want them or not because they are added to Object.prototype. This effectively breaks the count() function and I can’t see a viable way to work around the problem other than removing Prototype.js from the mix.

Why does prototype.js break the count() function?

Take the following example:

var o = {0 : 'a', 1: 'b', 2: 'c'};
count(o); // should return 3 but with Prototype.js installed it returns 25

This returns the wrong result because Prototype.js adds a number of methods and properties to all objects in the system, so the count() function must count these also.

jQuery to the Rescue

Luckily there is another library that does everything that I have been using Scriptaculous/Prototype.js for: jQuery. It is leaner and less intrusive. It doesn’t change any of the underlying types and it still provides the drag-and-drop sorting of sections, and collapsing/expanding of sections. And in most cases it provided a cleaner, faster solution than was required with Scriptaculous.

July 4, 2007

Insulating the ZODB from bad products

Filed under: Work, Software Development — shannah @ 5:25 pm

The ZODB (Zope Object Database) is a wonderful little invention that provides Zope and Plone with a lot of flexibility. Because it is uses a heirarchical format, it is intuitive and easy to move and copy objects around.

However, it seems that the proper functioning of the ZODB depends heavily on all of the objects stored therein being in good health. This means that if you inadvertently install a product that doesn’t cover all of its bases, you could be up the creek without a paddle when it comes time to copy or migrate the site.

I am currently attempting to upgrade our Faculty’s plone web site to use the new SFU look and feel. I set up a development server a couple of months ago to work on the new skin. Now that it is ready, I would like to create a copy of our site on the same Zope instance so that I can install the skin on that instance, then just change the path so that the change can happen instantaneously.

This strategy would work perfectly if we were working directly on the file system. However, I have encountered a basket full of problems in trying to make this copy. It seems easy enough. You click the little box beside the site in the ZMI, press the "Copy" button, then click the "Paste" button. If only it were that simple.

In my first attempt, it churned for about 30 minutes before returning an error that it couldn’t find a transform for the image/pcx type. After some searching, I found an obscure fix for this issue, involving the temporary removal of one of the python source files for the PortalTransforms package.

My next attempt resulted in some errors relating to an old product (CoreBlog) that was no longer installed in the system. Apparently there were still some remnants left in the ZODB. I couldn’t find any actual CoreBlog objects, but the error seemed to indicate that there were some remnants left in the portal catalog.

So I tried updating the portal catalog to see if that would fix anything. After about 30 minutes of thinking it returned an read-write error.

Next I tried to clear and then rebuilt the catalog. This worked. Now I’m back trying to make a copy of the site… It is still thinking….

Getting to the point

So the point of this post was two-fold.

  1. To rant about Plone
  2. To suggest to those who might be reading this and have a hand in the direction of Zope and Plone, that the ZMI should be insulated from bad products. Imagine if, when copying files from your hard disk to a flash drive, the operating system crashed because one of the files was corrupt. This would make computers nearly impossible. How about an error log to inform me that one of the files couldn’t be copied - but let the rest of the copy go through. Or better yet, let the copy go through unhindered, allowing whatever problems were existent on the original file to be copied through to the copy. I could live with that.

April 12, 2007

OpenOffice Base Links

Filed under: Work, Software Development — shannah @ 3:49 pm

Open Office Base Message Forum

Good open office base tutorials

Filed under: Work, Software Development — shannah @ 3:41 pm

http://sheepdogguides.com/fdb/fdb1main.htm

This guy has some nice tutorials on how to use the Open Office Database tool.

Dataface to Open Office: You complete me

Filed under: Work, Software Development — shannah @ 8:34 am

I just ran across the latest release of Open Office.org (version 2.2.) which includes the holy grail of database development: Base. This version contains a built-in database that moves into the realm of filemaker for ease of use. It allows power users to develop tables, views, queries, forms, and reports inside of OpenOffice. What’s more, once you have registered the database, you can use it in the other parts of open office (like Writer and Calc). This is the way it ought to be.

It now looks like Open Office is a perfect development environment for DBAs that need to unroll database solutions for clients. It is available on just about every OS under the sun so there are no compatibility issues. All of the databases are stored in the Open Document format - so a database can be shared and copied.

What really interests me, however, is the fact that these great tools can work with existing SQL databases like MySQL with minimal hassle. That, and the fact that the DBs are stored in an open format.

Here’s the idea: Dataface can create .odb files (the database file format for Open Office) on the fly that will allow users to interact with the database application using the quick and easy Open Office interface. For some things, a web interface is just too clunky. I’m not sure how deep this rabbit hole goes, but I intend to explore it to its limits to see just how much Dataface can be integrated with Open Office.

January 23, 2007

CAS4PAS Mission - The further adventures of Plone 2.5

Filed under: Work, Software Development — shannah @ 4:10 pm

Okay.. I’m still at this Plone 2.5 upgrade thing. The early reports saying that the upgrade from Plone 2.1 to 2.5 is a snap are indeed correct. Unless you are using CAS for authentication.

Since Plone 2.5 uses PAS (Pluggable Authentication Service) which is very different than the way 2.1 handled authentication, it is necessary to do away with the old way to do CAS auth.

Begin rant ….

The single biggest complaint about the Plone/Zope community is that they think that backward compatibility is optional. They don’t think twice about breaking old code in favour of new features. Undoubtedly PAS is a superior way of handling authentication and permissions than the old way, but couldn’t they make it backwards compatible with the old way of doing things. It is ridiculous to think that every time I have to upgrade to a new version that I have to spend a week or two feeling around the bugs and bases of the code and configuration just trying to make it work again. This paragraph is written out of anger and frustration…. bahh!!

End rant …

Okay, back to rational thinking. Here is what I have done so far:

  1. Downloaded CAS4PAS 1.0.0-1 and installed in the Products directory.
  2. Restarted Zope and added a CAS Helper to the acl_users folder of my Plone site - then copied the settings across.
  3. Downloaded and installed the new version of PloneCASLogin (because the old version doesn’t work with PAS).
  4. Went to a different browser and tried to log in using CAS.
  5. The login button takes me to the CAS login page OK, but when I return to the Plone site, it says that there was a sign-in failure.

At this point I went back to the download pages for the Plone CAS Login and CAS4PAS products to see if I was missing anything. I noticed a patch to make it compatible with CAS 2 (not sure if my server is CAS 1 or 2, but I thought I might as well download it anyway to see if that was the problem.

  1. Downloaded and ran the patch
  2. Restarted the server and tried to log in — same problem!
  3. Scoured the internet for information from others having the same problem. Found one helpful post here.
  4. It suggested that I try to disable the “Challenge” feature of the credentials_cookie_auth in acl_users.
  5. Same problem!

That is where I sit right now… No clues, so I’ll dig deeper into the code and see what I can find….

January 10, 2007

Plone 2.5 migration Chronicles

Filed under: Work, Software Development — shannah @ 2:07 pm

Okay.. the time has come for us to migrate from Plone 2.1 to Plone 2.5 on the Faculty web site. The word is that this migration should be much easier than the migration was from 2.0 to 2.1.. so here is a little log of my experience:

  • Given that requirements for Plone 2.5 include Zope 2.8.7+ or 2.9.4+ and we are running 2.8.5, I put in a request to the network support guys to upgrade Zope. They upgraded to 2.10.1 (which would seem to meet the requirement of 2.9.4+) and gave me the reigns.
  • Tried migrating the dataface site using the portal_migration tool. The migration appeared to be successful, so I proceeded to do a version migration on the portal_atct tool. That migration also appeared to be successful. Wow! Was that ever easy! But wait a minute …..
  • When I tried to visit some of the pages of the migrated dataface site, I received “404 resource not found” errors. Something went wrong, but what?
  • I then took a step back and tried something simpler: adding an empty plone site using the ZMI on a default Plone 2.5 install. The installation failed with errors.
  • I began to suspect that Plone 2.5 was not compatible with Zope 2.10, so I did some googling and found out that indeed it does not work. The requirement of 2.9.4+ actually means 2.9.x where x >= 4 - and NOT x where x > 2.9.4.
  • Then I got another bright idea: The requirements listed on the plone site for Plone 2.5 were identical to the requirements for Plone 2.1.4. We were running Plone 2.1.2 fine on our Zope 2.8.5 box so I thought maybe the 2.8.7+ requirement might be lax on the last digit, and that 2.8.5 would work. WRONG! It didn’t work.
  • Sent in a message to the network guys asking for a different Zope install (we’ll eventually have to upgrade to Zope 2.10 for Plone 3, but that won’t be for a while.
  • Now with my newly installed Zope 2.9.6 instance I was ready to go to town.
  • I ran a migration on the dataface site using the portal_migrations and portal_atct tools, and tested the site out. The migrations went smoothly (took about 20 minutes, but everything works tickity boo).
  • The Faculty site is another story. We are using CAS authentication on the site so that users can use the SFU single-sign on features and we don’t have to handle passwords. Apparently Plone 2.5 using PAS (Pluggable Authentication Service) which is quite different than the old system and doesn’t support migration of CAS User Folders. Hence the migration in portal_migrations failed.
  • Googling on the internet led me to a number of pages describing this issue. Apparently the current workaround for this is to delete the CAS User Folder and do the migration, then install CAS4PAS - an alternative CAS product that works with Plone 2.5. The problem is then I think we may lose all of the user roles, groups and permissions. :(
  • To be continued ….

January 4, 2007

dhtmlXGrid, open source but painfully restricted

Filed under: Work, Software Development — shannah @ 1:52 pm

I have been attempting to incorporate dhtmlxGrid into Dataface to spice up the editing of related data on web forms. Since Dataface is open source under GPL, any library that I choose to include must also be open source and compatible with GPL. dhtmlxGrid standard edition fits this criterion so I decided to take it for a spin.

Unfortunately the standard edition appears to be no more than a trial version of the software as it does not contain any ability to extract data from the grid (that I can see). Without this ability, it is impossible to actually save, submit, or send data from the grid to a database or a form. What good is a grid like this if it cannot be saved? All of the features that would enable saving data are reserved for the professional edition which has quite a restrictive commercial license which is, safe to say, not compatible with GPL.

I do however give them props for releasing the standard edition under GPL. They could have just released a trial version with no distribution rights at all. As it is, at least I can dig into the code and add the necessary functionality myself.

I am working with the Firefox Javascript debugger to try to see where the data is hidden. This will be a little time consuming, but the end result will be worth it, I think.

Next Page »

Powered by WordPress

Sitemap