Friday, March 4, 2011

PHP literate programming project

This is going to be a somewhat terse post given the ambitiousness of the project I'm going to lay out.  I'm just interested in getting it out there to get some useful feedback.

Last year I wrote a simple literate programming system in perl, which accepted files in an extended docbook format, and had tangle and weave utilities to create source code (tangle) and well formatted xhtml articles (weave).  It was actually a pretty successful project, as it was target language agnostic.   The system didn't care whether the language to tangle was c, lisp, forth, or haskell, as long as the programmer knew the order required by the language.

At about the same time I conducted a podcast interview with Donald Knuth  which inspired me to take the project very seriously.

Since then I've done nothing with the perl version of the project, and have shifted my income generating attention to php.

So here's a gonzo version of an SRS for the PHP version of my utility.

The utility presents a web interface which accepts one or more files in an extended  docbook format (with added tags appropriate to literate programming), either imported or entered via a web based docbook editor.  The main interface gives three basic options, edit (create a source file in the extended docbook format), tangle (create a compilable or   interpretable file of source code), or weave (create an awesome human readable article explaining how the code works, with the complete source code imbedded ... see any of Donald Knuth's writings on literate programming to see how this works).

What I need from you PHP geeks is advice about the most efficient way to build a really good online Docbook editor.  I can probably figure out the backend tangle and weave routines quickly (it'll look a whole lot like the perl code I've already written.

Sunday, February 27, 2011

Matcha and my own tea ritual

I've had a fascination with the components of various foods and beverages for years.  While I've never been a food geek to the extent of Jeff Potter's  Cooking for Geeks: Real Science, Great Hacks, and Good Food I like knowing what's in my food, and the potential benefits and risk of any given food choice.  In addition to the heath ramifications of tracking and learning about one's dietary choices, grappling with the chemistry and biology of food is fun.  At least it is for me.

I've never had a background in chemistry, so armed with a copy of Chemistry: Concepts and Problems: A Self-Teaching Guide (Wiley Self-Teaching Guides) and Wikipedia, I began a process of trying to learn as much about food and nutrition as a layperson with limited time can digest.

As a consequence of this, I've developed by own little morning tea ritual, involving matcha, the finely ground powdered green tea used in the Japanese tea ritual.

The potential health benefits of green tea are well known.  It contains numerous phytochemicals, vitamins, and minerals, but of particular interest is a polyphenol known as Epigallocatechin gallate (EGCG).  EGCG has received interest as a potential preventative for cancer and some autoimmune diseases.

But like any other chemical substance there are circumstances under which EGCG can be harmful.  The wikipedia article on EGCG mentions some of those circumstances.  They include pregnancy (high intake of polyphenols during pregnancy can increase the risk of neonatal leukemia),  and when using the anti-cancer drug Velcade (EGCG can reduce the bioavailability of the drug).

Since I'm neither pregnant, nor on anti-cancer medication, I've devised my own tea ritual in the morning, which diverges substantially from the Japanese method of preparing the tea, but which works for me.

I sift a teaspoon of matcha powder into a mug, then pour about 1/8 cup fresh squeezed lemon juice onto the powder, and rapidly stir it with a fork (since I've yet to acquire one of the little wooden wisks).  This forms a rather thick sludge.

I pour a cup of hot (not boiling) water from a tea kettle into the mug.  The resulting beverage is both sour and somewhat bitter, but I've grown to love the concoction.  I often exacerbate the bitterness by eating a tablespoon of cocoa nibs along with the tea.  I wouldn't advise adding the cocoa nibs unless your taste buds really thrive on bitterness, but it works for me.  The Japanese ritual includes eating small sweets to mellow out the strong bite of the matcha.

Whether any of my dietary eccentricities will actually have an appreciable impact on my longevity is unknowable.  But I have fun with it, learn a bit about a couple of branches of science, and on balance my diet is much better than the average diet in our American Fast Food Nation.

Monday, February 7, 2011

Professor Irwin Corey

OK, I realize that the modern definition of  the word "technology" in the popular lexicon is narrowed to the point of only including digital technology which sprang from the recent resurgence of the Internet. 

But I'm on a mission from God, in the Blues Brothers sense of the phrase.  My mission is to get proper recognition for Professor Irwin Corey before that 96 year old gentleman dies.

To learn a bit about him go here:

To see him in action in his prime just watch this video

Saturday, January 15, 2011

Trend Micro CEO advocates "security through obscurity"

Here's a link to some commentary by Ricky at Digitizor regarding Steve Chang's statement that closed source software is inherently more secure than free or open source software.  FUD just never seems to die, but I'd hope that Mr. Chang,  the CEO of a security firm, would think this sort of issue through a bit more thoroughly.