Archive for the 'Computers' Category

31
Jan
09

the NSF website background

Browsing over to the NSF today to do a little work, I came across a common annoyance that arises with respect to their website background image. Basically, on my setup (OS X; Safari), the background tends to flicker/wobble, inducing a sort of nauseous, pre-seizure condition. Here’s a fix, which is worth it if you spend a lot of time at the NSF site.

For basic website filtering, I use Privoxy, which is a great way to reduce common website annoyances like cookies, javascript, etc. In addition, you can create actions, in addition to the defaults, to change the appearance of particular websites to your liking (similar to Greasemonkey for Firefox), although the implementation is different.

Long story short, if you have Privoxy installed (i get it via Macports), you can do the following to fix the “problem”:

sudo nano /opt/local/etc/privoxy/config
# uncomment the following line around line 375:
actionsfile user.action # User customizations

# while your at it, change line 917 to the following
# which allows you to edit things via the handy web interface
# at http://p.p/. Beware of multi-user security issues.
enable-edit-actions 1

Now, create or edit /opt/local/etc/privoxy/user.filter adding the following contents (the code is at Snipplr due to WordPress filtering):

Privoxy nsf filter

Once completed:

  • visit http://p.p/
  • click “View & change the current configuration”
  • choose to edit “/opt/local/etc/privoxy/user.action”
  • choose to “Insert a new section at top”
  • choose “Edit” under Action
  • select “filter nsf” from the list
  • click “Submit”
  • “Add” a url pattern
  • type “.nsf.gov”
  • click “OK”

Problem solved. The NSF website should now look like this.

Advertisements
11
Jan
09

Management of Lab Resources

Although I hate to be a bit of a ninny about these things… there is one thing that takes: (1) quite a bit of time out of each week and (2) I hate. What could it be?  In very general terms:  “lab resource management”. Cases in point:  the inevitable (and often required) management of chemical inventories, SOPs, MSDSs, orders, receipts, equipment, etc.  

At the moment, I am working on putting together valid SOPs for the lab (this should have been done months ago).  Of course, I could throw these together in LaTeX, MS Word, or Pages and keep them as files on my computer, printing out “hard-copies” whenever they are needed. Adjustment of a single documents requires that I open the relevant file, make the changes, and save the resulting copy.  Wholesale adjustments to all files are time-consuming, and accessing the content of each document for various purposes at a later time, while not impossible, is less than fun. 

I would really like all of this type of data be in a more flexible format than that imposed by any of the options above.  In short, I want to store my data (for each task) in a database (RDBMS), such that I can interact with it, produce the output that I require at any given time in whatever format I desire… be that PDF, HTML, text, etc.

Why?

Well, basically, the RDBMS path provides a lot of different options for the maintenance of the data and the production of each output format. For instance, I can setup the RDBMS such that updates to a particular record (say, the description of a single SOP) trigger a procedure to increment the revision number for that document, while also recording the date the SOP was updated, and recording the username of the individual making the changes.  

While this is not terribly helpful if you only have 1-2 documents to keep updated, it becomes terrifically powerful on a larger scale (100s to 1000s of documents).  Furthermore, it helps me maintain the integrity of the data present in each record.  In other words, if many of the fields are updated automatically, it removes problems associated with forgetting to make (or improperly making) manual changes to those fields of that record.

Well, what’s the problem, then?

The largest barrier to current progress is the fact that on-the-fly PDF creation is not terribly fun or easy.  In some circumstances, PDFs are neither necessary or desirable.  But, for the purpose of creating SOPs to be posted in the lab or for completing our departmental purchase requests, they are required.

I would prefer to use something that interacts with a open-source RDBMS (MySQL or PostgreSQL) and Python.  Basically, this appears to mean that I will be  working with ReportLab – which is certainly powerful enough to do what I both want and need.  That said, with power comes complexity, and I don’t find the thought of wading through the ReportLab documentation enjoyable.  Furthermore, although I have found some 3rd party documentation, there is really not too much information out there.

Perhaps the ideal solution would be to locate a software package that would allow me to interact with pre-existing PDF documents/forms.  That way, I can be lazy and use a relatively benign tool like Illustrator or LaTeX or MS Excel to create the layout for the forms that I want to use, adding the content to these forms using a combination of Python and RDBMS.

Does such a thing exist?