b r a y d e n . o r g / Random

/ WebHome / MonthlyDigest / MonthlyArchive / MonthlyArchive200301

This Web


WebHome  
Topic List  
Web Statistics 

All Webs


Books
Main
Random
Software
TWiki  

brayden.org


Home
Monthly Digest
Today's Links
Resumé
Reading List
Books RSS
Random RSS
Software RSS

Other


Joanne's Blog
Dale's Blog

Bloglines
currently-reading
Jetable email
TextDrive
Progressive Magazine
out campaign

Items archived from MonthlyDigest for January 2003. Includes TWiki RSS, DVD X Copy, REXML, and RSS.

Monthly Archive - January 2003


TWiki RSS

PaulPetterson pointed out to me today that TWiki now supports RSS (Rich Site Summary) feeds by a combination of the formatted search feature plus a skin. The result is an RSS feed that can be viewed from a headline viewer and distributed via a syndicator (like http://www.syndic8.com ).

I've added RSS feeds for the two of the webs here, at The Random Web, and The Software Web.

Details

The skin is very simple : it just adds the RSS xml header:
<?xml version="1.0" encoding="ISO-8859-1"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns="http://purl.org/rss/1.0/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wiki="http://purl.org/rss/1.0/modules/wiki/" >
% TEXT%
</rdf:RDF>
The formatted search uses pre-existing features of the built-in SEARCH variable, like so:
% SEARCH{".*" web="Random" regex="on" nosearch="on"
  order="modified" reverse="on" nototal="on"
  limit="16"
  format="<item rdf:about=\"http://www.brayden.org/twiki/bin/view/$web/$topic\">
    <title>$topic</title>
    <link>http://www.brayden.org/twiki/bin/view/$web/$topic</link>
    <description>$summary</description>
    <dc:date>$isodate</dc:date>
    <dc:contributor>
    <rdf:Description link=\"http://www.brayden.org/twiki/bin/view?topic=$wikiusername\">
    <rdf:value>$username</rdf:value>
    </rdf:Description>
    </dc:contributor>
    <wiki:version>$rev</wiki:version>
    <wiki:status>updated</wiki:status>
    <wiki:importance>major</wiki:importance>
    <wiki:diff>http://www.brayden.org/twiki/bin/rdiff/$web/$topic</wiki:diff>
    <wiki:history>http://www.brayden.org/twiki/bin/rdiff/$web/$topic</wiki:history>
  </item>"}%

- 28 Jan 2003

DVD X Copy

I came across a product recently that lets you copy your DVDs. Here's some excerpts from the advertising copy on their main page:

All the software you need to BACKUP, COPY & RESTORE your own DVD Movies is included in DVDXCOPY ! Within minutes, using our easy One-Click technology, you can COPY and BURN your own DVD Movies using nothing more than our software, a DVD-ROM and any DVD Burner including DVD-R, DVD-RW, DVD+R or DVD+RW.

Now you can backup your favorite DVD movies with nothing more than a DVD burner and your home computer with DVDXCOPY software. There's no need to invest hundreds of dollars in replacing lost or damaged DVD discs. Not when DVDXCOPY lets you make backup copies of all your DVD movies using a standard DVD+R or DVD-R burner! Best of all, your copies will play on your home DVD player just like regular DVDs! (Most Newer DVD Players support DVDR or DVD RW)

Every backup copy you make with DVDXCOPY is EXACTLY like the original. Nothing is compressed or left off the disc.

Though I'm not a big user of DVDs, I do own a few. And I own hundreds of music CDs. I have never yet lost or damaged a disc (except, of course, for the AOL discs I receive every few weeks). Frankly, I find it hard to believe that everyone who purchases DVD X Copy plans to use the product to guard against the possibility of 'losing or damaging' their DVDs. Cynical, maybe. I mean, let's run the numbers. To use the product you need a computer equipped with DVD player (standard equipment these days) and a DVD burner. What's the price of a DVD burner? I really don't know, but let's say it's $300. Then the software costs $100 (OK, $99). The average price of a purchased DVD is about $20, say. The price of a blank DVD-R (or other format) is, what? One dollar? I really don't know, but let's say $1 for now. So let's consider the hypothetical case of someone who owns 100 DVDs and who, for whatever reason, routinely carries DVDs around from place to place, thus exposing them to the risk of being lost or damaged. What is the probability of a single disc being lost or damaged that would justify the cost (not to mention the time) required to use DVD X Copy to 'backup' those 100 discs? The cost of 'backing them up' is $300 + $100 + $100 (the DVD burner, the software, the blank discs), or $500. The replacement cost for 25 discs is $500. The user would need to claim that he is likely to lose or damage at least 25 of his 100 discs.

Let's say that the probability of a single disc being lost (or damaged) is p0. Then, if we asssume that each of the 100 discs has this same probability of being lost, the overall probability of losing 25 or more discs is given by:

P = 1 - Πi=25...100 {1 - ( p0 i * (1 - p0 ) 100-i ) * C(i, 100) }
The basic idea is you have to compute the probability of not losing exactly n discs for n=25 to 100, then take the complement of that to find out the probability that you lose 25, or 26, or ... or 100 discs. The C(i,100) is the selection function : how many ways are there to choose i items from a set of 100 items. It's just 100! / ( i! * (100-i)! ).

Anyhoo, I don't know how to figure out the value of p0 that would cause the above expression to evaluate to 0.5 (the break-even chance of losing 25 or more discs). But by use of a little ruby program I determined that the value is about 0.265. So, to justify the various costs, you have to claim that you have about a 1 in 4 chance of losing or damaging any particular disc. If that really is your empirically-determined probability, then my advice would be: take better care of your stuff.

Here's the ruby program:

def factorial(n)
   return 1 if n < 2
   ret = 1
   (2..n).each {|i| ret *= i }
   return ret;
end
def selkn(k,n)
  return (factorial(n) / (factorial(k) * factorial(n-k)))
end
p = .265
n = 100
base=25
ret = 1
(base..n).each {|i| ret *= (1 - ((p ** i) * ((1-p) ** (n-i)) * selkn(i,n))) }
puts (1 - ret)

- 27 Jan 2003

REXML

REXML is a conforming non-validating XML parser written in pure Ruby. It is loosely based on Electric XML. It features a small, intuitive API. In fact, the author of REXML was inspired to write REXML by the contrast between the simplicity of Electric XML and the complexity of, well, all the other XML APIs. Here's what he has to say:

I have this problem: I dislike obfuscated APIs. There are several XML parser APIs for Java. Most of them follow DOM or SAX, and are very similar in philosophy with an increasing number of Java APIs. Namely, they look like they were designed by theorists who never had to use their own APIs. The extant XML APIs, in general, suck. They take a markup language which was specifically designed to be very simple, elegant, and powerful, and wrap an obnoxious, bloated, and large API around it. I was always having to refer to the API documentation to do even the most basic XML tree manipulations; nothing was intuitive, and almost every operation was complex.

Then, after showing contrasting examples of an obfuscated API vs. REXML ...

Can't you feel the peace and contentment in this block of code? Ruby is the language Buddha would have programmed in.

- 26 Jan 2003


Modern Control Systems

I've started reading Modern Control Systems by Richard C. Dorf and Robert H. Bishop. It's a large (800 page) and fairly complete treatment of model-based control theory, with lots of exercises and problems. It's a somewhat humbling experience for me, because I'm finding that my mathematics skills have become rusty. I'm having to keep my copy of Advanced Engineering Mathematics by Erwin Kreyzsig at my side as a refresher course in differential equations, Laplace transforms, and, well, nearly everything else. Nevertheless, control theory is fascinating even for those of us who don't do it for a living. - 25 Jan 2003

Hamish Macbeth

A few years ago I got somewhat hooked on a BBC television series called Hamish Macbeth. Recently I started reading the series of mystery novels on which the TV series was based. The novels are by M.C. Beaton. They are very small novels, less than 150 pages usually, and can be read in an hour or so. And they are a real treat. Hamish Macbeth is a constable in Loch Dubh, a tiny town situated next to a loch in the very north of Scotland. He's a very capable policeman, but doesn't want to be promoted because promotion would mean leaving Loch Dubh and the quiet comfortable life he enjoys there. His nemesis is an overbearing, crude, and rather stupid detective named Blair from the nearby city of Strathbane. The general plot line in the Macbeth series is that a murder is committed; Blair comes blundering and blustering in and makes a hash of the investigation; Macbeth gets to the truth of the matter, usually by bending a few rules; and in the end gives Blair the credit for the investigation, to avoid the inevitable promotion and transfer out of Loch Dubh. The pleasure of these novels comes not so much from the solution to the mystery (though the novels work credibly at that level) but from the characters.

From - 25 Jan 2003

UWTV

The University of Washington produces a large number of videotaped seminars and classes. It's available on (very) extended cable and at Dish Network (channel 9402 or some such). Many of the programs are also available online at 3 quality levels suitable for dial-up, DSL, and LAN-speed connections. They publish a listing of the upcoming week's broadcast schedule of seminars, and there's also a schedule of videotaped classes. Check it out - the seminars have featured very interesting speakers such as Robert Tarjan (Google:Robert+Tarjan), Vanu Bose (Google:Vanu+Bose), senior researchers from Microsoft, and from universities around the country. - 25 Jan 2003

 
 
Current Rev: r1.1 - 03 May 2008 - 21:40 GMT - DaleBrayden, Revision History:Diffs | r1.1
© 2003-2006 by the contributing authors.