computing (104)

A programming thought experiment

When you're coding a function, start with the return statement and work the logic backward to reach the inputs. Since we're more concerned with the function's output, this reversal does shift the focus on getting the result required instead of starting off far away, at the input level.

A Semantic Web gateway to the World Wide Web

The Semantic Web is going to hit us. When? Some say it already has. But for the rest of us, we're still stuck with Google and online applications that require typing in our data over and again.

The problem is that the amount of existing Web apps that need to be retrofitted with Semantic Web information is staggering. Sure, most CMSes can host modules that export metadata, but it still requires the willingness of all those millions of webmasters to go through the concerted effort of updating their deployments.

The problem of nodes relationships in Drupal

in

An important problem that Drupal faces is the inability to create relationships between nodes. Current solutions are either half-baked or over-ambitious. The half-baked doesn't properly model the ER and OO model of relationships, and the over-ambitious attempts to supply a fully Semantic Web framework, even when it's not required, at the cost of considerable design and code complexity. Plus, it's not ported beyond 4.7.

Extension to the node_reference CCK field type

in

A cool little addition to the field type node_reference would be to allow for the referenced node to be embedded inside the referencing one, both for viewing and for editing.

The read-edit view for nodes

in

To enhance the usability of Drupal, one useful addition would be a read-edit view. This view would be a new node template that allows in-place editing of the node. By clicking or otherwise gesturing on any field of the node (title, body, tags, CCK fields, even separate paragraphs of long text fields) this field would display its own editing block to allow the authorized user to edit it.

Matrix programming in Excel

Excel is like a giant matrix programming pad. Take a financial statement for example: I am just learning to read one and I am discovering the logic behind the usage of the tool.

The statement can be considered a computer program made up of arithmetic and logic operations on matrices. One of its output is the Balance Sheet, that pulls results (i.e., invokes functions) from the various other sheets, namely: Income Statement, Cash Flow Statement, Revenues, Expenses, etc.

Organizing an index organically

in

Classifying content in Drupal requires creating several taxonomies of various types. One of the useful types for rapid and informal classification is free tagging, where arbitrary, unrelated keywords can be attached to nodes. It is more general than, say, the index we find at the end of a book, where the terms are explicitly found in the text. but I'm getting ahead of myself: let's start at the beginning.

Hack: Enabling Unicode in XScreenSaver

When I tried to display Arabic text in some of the hacks, like noseguy, I failed miserably. Panicked, I posted to the Ubuntu forum asking for help. With a little help from my friends, and some code digging, I found that XScreenSaver hacks are not Unicode-ready at all.

Module: workflow_fields

The workflow_fields module extends John VanDyk's workflow module by allowing CCK node fields to be made invisible or read-only depending on the current workflow state. The workflow state form is extended to show all node fields with appropriate controls to hide and/or disable each field for that particular state.

This functionality is useful when a workflow moves among users who have different permissions regarding the document flowing through them. Which is the case in most every workflow we've encountered.

Check it out: http://drupal.org/project/workflow_fields

Module: views_bulk_operations

One of the useful Web patterns I've been noticing has to do with item lists and bulk actions. Given a list of items, add a checkbox in front of each item, and let the user select an action to be executed on the checked selection. Specifically, I've seen it in phpMyAdmin, Mantis, and Google Mail.

This module provides a solution. It comes as a Views style plugin called "Bulk Operations View", selected in the "View Type" control of the View editing screen. This new style creates a form around the view, adds a checkbox in front of each element, and exposes the available Actions as well as all node_operations provided by loaded modules. When "Execute" is clicked, the form asks for confirmation then applies the selected action on all selected nodes.

Check it out: http://drupal.org/project/views_bulk_operations

Syndicate content