Genii Weblog


Civility in critiquing the ideas of others is no vice. Rudeness in defending your own ideas is no virtue.


Wed 13 Jul 2005, 10:53 PM
You learn something new every day.  I was thinking about poetry, which I do rather more than I should I suppose, and especially about Dr. Seuss style poetry, and I decided to find out what it is called.  According to Wikipedia, Dr. Seuss's meters include anapestic tetrameter and trochaic tetrametere, along with the occasional iambic tetrameter.  According to the article, anapestic tetrameter was used by Byron as well.  Who'd have thunk it?

Copyright © 2005 Genii Software Ltd.

Wed 13 Jul 2005, 02:36 PM
While I don't much like the phrase "eating your own dogfood", the concept is good.  Any software developer should use his or her own software on a regular basis.  Sometimes that is a nuisance, but sometimes, like today, it is a pleasure.  I realized that our Web Editors page had lots, as in 285, URL links, and that many of them had a target of "_top" to replace the current page, when I wanted them to have a target of "_blank" to create a new page.  I changed about ten by hand, got bored, and wrote a quick Midas script which took care of them all in about 5 seconds (plus the five minutes it took to write).  Here is the code:

Call rtitem.ConnectFormBody("", "showcase.nsf", "WebEditors")
Set rtchunk = rtitem.DefineChunk("URLLink 1")
While rtchunk.Exists
   target = rtchunk.GetTargetProperties("URLLink", "Target")
   If target <> "_blank" Then Call rtchunk.SetTargetProperties("URLLink", "Target='_blank'")
   rtchunk.GetNextTarget
Wend
rtitem.Save
Messagebox("Fixed up all " & rtitem.Everything.GetCount("URLLink") & " URL hotspots")

See, your own dogfood can taste good, once in a while.  Of course, I could have written it more simply and efficiently, I now see, with:

Call rtitem.ConnectFormBody("", "showcase.nsf", "WebEditors")
Set rtchunk = rtitem.DefineChunk("URLLink *")
Call rtchunk.SetTargetProperties("URLLink", "Target='_blank'")
rtitem.Save
Messagebox("Fixed up all " & rtitem.Everything.GetCount("URLLink") & " URL hotspots")

which runs in about a second and a half, but in either case, it sure beats going to each hotspot manually.

Copyright © 2005 Genii Software Ltd.