Category: Computer Programming
Genetic World
July 2nd, 2007 , by adminBookshelf:
Kenneth T. Jackson: The Neighborhoods of Brooklyn (Neighborhoods of New York City)
Leonard Benardo: Brooklyn by Name: How the Neighborhoods, Streets, Parks, Bridges and More Got Their Names
Conway Morris: Life's Solution
June came and went very, very fast. Although I announced that I had finished writing the GenoType Diet several months ago reality, alas, kicked in. So today, as many people celebrate a sort of independence, I am still working out the final kinks to the diets for each GenoType. I am greatly assisted in this by the software package that I wrote called the DDE (D'Adamo Diet Equalizer). The DDE is a program that allows me to query the vast databases that I have developed over the years and interface these databases with other database such as the SR19 Food and Nutrition Database from the US Department of Agriculture.
Using the DDE to generate the diets has been a revelation. I can filter data based on over 250 different elements in the diet; PCB, dioxins and mercury in fish; 5 classes of phenolics; over 12 different classes of antioxidants; low or high bacterial overgrowth residues; lectin content, and on and on. The DDE is available for use by IfHI Masters. If you have taken the certification and want to use the DDE contact the IfHI Office and they'll send you the password to get in. If you're interested, you can read the DDE User Manual.
My friend Bob turned me on to a great way of making bread that involves no kneading and yields absolutely wonderful results. Here is a movie from the NY Times. Of course they are using wheat flour. I'm letting my first loaf rise overnight as I write this blog. I used spelt, flaxseed husk and buckwheat. As per Bob's advice, I ordered a cast iron Dutch oven from Amazon, which, along with the long rise, give the most outrageous crust you can imagine.
[youtube]http://www.youtube.com/watch?v=13Ah9ES2yTU[/youtube]
I've been gardening a lot this year. And swimming. Discovered a neat trick for bugs: Neem Oil. Since it doesn't strongly affect humans, mammals, or beneficial bugs, farmers use neem oil as an insecticide and miticide to keep away pests like aphids and white flies. Neem oil even protects crops from fungal infections such as mildew. Since we have a lot of deer in Connecticut, I've also become quite fond of Bobbex, a natural deer repellent.Also been listening to shortwave radio for the first time since I was a kid. Boy, how many summer nights did we kids struggle to to locate Radio Nauru, just so we could get the QSL (verification) card? Shortwave is a nice window on the world, since the 24 hour crisis reporting we in America call 'news' seems increasingly cynical and transparent.
Quiet around the house. Kids are off to summer camps and intensives: Claudia to Tuft's in Boston for an SAT Prep Intensive, Emily to Maine for camp. Martha and I have really enjoyed these last few days of making dinner together and luxuriating in the yard. Still, you don't need much time to start missing them.. Father's day was a hoot. I finally got my wish: An Evil Knievel tee shirt.
Last week we had a great marketing meeting with the team over at Random House. What offices! The conference room overlooked Central Park South. Nice, talented bunch of people they have over there. We met my new editor, Stacy Creamer, in person for the first time. Stacy is really wonderful to work with – I feel that she will make the GTD a better book. Perhaps all these rewrites had a purpose. Each has given the book a new level of depth and clarity. I suspect many of you will find the book surprisingly accessible and chatty despite its apparently complicated premise.
Food Equalizer
April 27th, 2007 , by adminSpent the last two weeks in feverish rewrites of The Genotype Diet. The results appear to be a manuscript that is tighter, better organized and much less 'difficult' to decipher for the average layperson. Very readable, in fact. Something that my new masters at Random House care (not unexpectedly) very much about.
A lot of credit for this must go to Rachel Kranz, who has come in at the eleventh hour and really polished up the work. Rachel has done a lot of good writing (The Chemistry of Joy and the The Fat Resistance Diet are two books that many people are aware of. So now the manuscript is back at Random House editorial offices and I'm hard at work at finalizing the prescriptive parts of the book.
To do that, I wrote a program to help me sort out the myriad factors that are associated with the food values in the Genotype Diet. How different are things from the of Eat Right For Your Type days, where things were just kept in notebooks! For this book, I condensed huge amounts of information into massive data files. These include, to name a few, the mammoth USDA SR19 Nutrient Database and most of it's adjuncts (such as the proanthrocyanidin, isoflavone, flavone and choline metabolites); all of the Lecster lectin database; all of the BTD values, all available data on food contamination, allergens, chitinase, pesticides, carbohydrate breakdown values, etc.
Putting the data together was just part of the job. A lot of this I could do with judicious use of textfiles, databases and spreadsheet editors. After that I still had to write a program, essentially de novo, that could scan that data and derive conclusions that I was interested in. This I did with the D'Adamo Diet Equalizer a tool that allows me to zoom in on specific nutrients and filter them in and out of my equations.
The idea came from working in my home office and listening to iTunes a lot. Every once in a while a song comes up that just requires a little tweaking to get it to sound right. Normally you do this with a device called an equalizer; a series of sliders that filter out parts of the audio spectrum. At one point I was adjusting the built in equalizer in iTunes for the song listed above (a very good approximation of pre-ambient Brian Eno, if truth be told) when it occurred to me that it might just be a cool idea to write a program that used the equalizer interface to filter my data for The Genotype Diets. Thus the D'Adamo Diet Equalizer:

The stuff on the top are switches that filter specific choices; i.e 'restrict all foods which are avoids for blood type AB non secretors and have a high glycemic index" or 'include all grains which don't contain gluten or gliandin which are neutral or beneficial for type O secretors'. That kind of stuff is simple enough to do in Perl and HTML. However, developing the next series of filters, the slider channels, was more difficult, since browsers and HTML don't have a provision for slider-type input. However, I did find a nice Java applet that solved the problem. This part of the software works by allowing me to move the slider up or down and then letting it adjust the choices based upon falls within that range. For example, if I move the sider up it might include all foods with creatine content above 4 mg per 1 cup serving, or restrict all foods which have greater than 350 mg sodium per cup if I move it down. Problem here is that food values vary considerablly between foods. If I make the top of the slider full value the highest value in the database things can get screwy. For example, the highest value for sodium in the database is (perhaps no surprise) salt. It has something like 35000 mg of sodium per cup. Second place is not even removely close. Thus if the top slider number (+50) was just the highest value (salt), all the other values for normal foods would probably lie between 0 and 1. Although this is how a lot of the online nutritional databases present the data, in this form it is not very useful. Fortunately I was able to use a few log functions to spread out the data till it was silky smooth.
It's a cool tool and like any craftsman, I take some pride in the quality of the presentation as well. Actually perhaps too much pride since I eventually have to stop playing with the thing and go to work. The DDE turns out to be very useful in the Clinic, especially when I have to do a quick tweak on a patient who is already following the basic SWAMI program.
Hopefully by IfHI 2007 I'll be in a position to let the folks there tinker with it.
As for the readers of the GTD, they'll see nothing of this. Just a beautiful stretch of road where the gorgeous scenery just seems to go on forever.
Estupendo
March 23rd, 2007 , by adminHad a few obligations to tie up last week in the EU, which allowed for a few days rest and relaxation in the south of Spain. The area is one of my favorites, with good food, sunshine and great culture. Revisited the famous Mezquita (mosque) in Cordoba, one of the true architectural delights of the world. At one time the second largest mosque in the world, the mosque was turned into a cathedral with the Christian capture of the city in the 12th century. Although there are numerous naves to various saints, these are all relatively underwhelming when compared to the intoxicating forest of columns, spandrels and arches that immediately confronts the visitor.
Here are a few pictures that don't do it justice:
The wonder of having two teenage daughters is that at the end of the day I'd calculated that we'd spent more time (45 minutes) at the local department store (El Corte Ingles) then at what is widely considered one of the greatest buildings in the world (35 minutes). Oh well, I have my video tapes.
Also took the time to reread James Mitchener's wonderful book Iberia which should be mandatory for all who visit the country. Although written in the 1950's and '60s, it is still a fresh and relevant look at the Spanish psyche, written by a true student and devotee.
During our all too brief time we stayed at a few of the government run hotels, called paradors. They are often in castles, palaces, fortresses, convents, monasteries and other historic buildings. Surprisingly from my last visit, in addition to the often ponderous local fare, which can vary from great to abysmal, there are now special menus for vegetarians and celiac diners, which are what we often chose from.
Although I have family in the north of Spain (near Barcelona) we were not in country long enough to travel the distance necessary to visit them, however hopefully in the fall we'll get a chance to shoot up there.
Returning back to New York's JFK airport we were assaulted by the aftereffects of a rather large ice storm, which blanketed the area with almost a foot of snow, which then compacted down to a blue stone-like ice, so I spent my first day back chiseling out our cars from the snowy depths.
¡Que lastima!
IfHI 2007 has hit the magical 60 day mark, which traditionally ramps up my stress levels a bit. Personally, I feel more comfortable going into this conference that with either of the prior two, having perhaps a surplus of material for the first time.
Enjoying Rex Dwyer's wonderful book about programming bioinformatic computer code Genomic Perl. Not for the fainthearted, but gosh, what a treasure trove!
Buddha Machine
December 31st, 2005 , by adminMy friend gave me an interesting gift this holiday season: A 'Buddha Machine,' a transistor radio-sized device with a loudspeaker which plays ambient-ish music. The Buddha Machine is a hardware loop player, built kind of like a little AM radio, playing 9 different built-in loops on an endless cycle, with one simple button allowing you to fade between them. It was inspired by a popular Buddhist accessory, a small portable device they sometimes carry that when activated plays a musical chant to pray along with, such as the 'Refuge Prayer', hence the name. It sells for about $25 USD, with batteries, which at least partially explains why it is so cheaply manufactured. It is available on the internet from a variety of outlets.

The nine loops are available to download for free from this site. They are tiny .mp3 files, so you can right-click on each of them, select 'Save Target As' and save them to your desktop. If you have iTunes, which you can also download for free, you can make a playlist and have your own virtual Buddha Machine.
The sounds themselves have nothing to do with Buddhism; they're just quite and restful.
Received a few '2006 Lectin Calendars' from one of the lectin chemical manufacturers. They are rather nice, a 2006 calender of big, beautiful pinup shots of all the BTD avoids.
How to wallpaper a house thru the mail slot.
December 14th, 2005 , by adminYes, I know, it's been a long, long, time since a new blog entry darkened these pages. I'm going to take the easy way out and ascribe my lack of verbal productivity to the simple fact that there is just not enough time during the rotation cycle of this planet to get everything done.
For the last month (or more exactly, since I finished The Determinator) I've been hard at work on SWAMI. It's been a sort of three legged race, one step forward, two back; certainly an argument for ‘non-intelligent design.' As I start one section, my thoughts turn to some new function that would be cool to implement, which then sends me packing to the programmer textbooks and websites, which betray new capabilities, that then illustrate to me that my original design thoughts could have been better.
However, I must say that the software is very, very cool. We've been using beta-versions of it in the office and the patients have really liked it. Image all your specifics (Body Mass Index, Basal Metabolic Rate, Family History and Lab Values) and a whole slew of new criteria (biometrics) mixed into a bouillabaisse of information points and then set loose on huge tables of data. It is as if you bought a magic, Harry Potter version of Eat Right 4 Your Type where every page was written only for you --no doubt a dream come true for those thousands of readers who have told me over the years that they never read any parts of my books other than the section that pertains to their blood type.
I suspect that the software will be available to IfHI folks by year-end.
Interestingly, building the SWAMI engine has helped bring the material for The Genotype Diet into focus, since if you look at the SWAMI Engine as information going from intake screen to report, the Genotype Engine is just the information going the other way.
Heavy.
I continue to train vigorously. Right now I am working on a part of a very long hyung (form) that features the most vile, ego-dissolving series of moves. At the start of the sequence you raise your left arm into a high block while simultaneously lifting you hip and rotating it so that from the knee down the leg is parallel with the ground. You are actually doing this as a knee kick, so it must be done fast, which certainly does nothing for your balance.
But wait, it gets better. So now as your arm moves from above your head to being outstretched and your hip is rotated with your lower leg sideways at about hip level, you spin on the rapidly wearying right standing leg 180 degrees, and jump into the air as you execute a outside-inside crescent kick to the now-outstretched left hand.
Then you do the whole thing from the other side.
Perhaps the coolest thing about working on these moves is that I developed an appreciation of how ice skaters use moving their center of balance inward as a way to initiate and maintain a spin.
They say that Hwang Kee, the founder of this discipline, used to amuse his friends by jumping over the dinner table from a standing position. From photos it seems Master Hwang was about 5 feet tall and probably 98 pounds soaking wet. A 6 foot, three inch Spanish-Italian Meso-Ectomorph would probably be far less amusing at this; especially if you were hungry.
Took the family to Brooklyn last weekend. It's about a two hour ride from Connecticut, and the last hour is on the rapidly dissolving New York City infrastructure, which, if you spend any time away from it, leaves you completely unprepared for just who narrow and crumbly the NYC roads are.
I had a thoughtful time, visiting areas of my youth, though I doubt my kids cared much about whether this or that stretch of woods was where I used to catch butterflies, or which catering hall used to be a police station. They did appreciate a trip to perhaps the best designer outlet store in the city, Century 21 Stores.
Then we schlepped to Rudy Guiliani's favorite restaurant, Gargiulos in Coney Island, where I overdosed on the garlic and broccoli rabe. I did not jump over the table, which considering the clientèle, was probably good for my health on a lot of different levels.
Anyway, gotta go. But before I do, let me wish all of you a Happy Thanksgiving, with all the enjoyment that comes from taking a minute to contemplate what great gifts life, health, and family afford us.
I promise to write more regularly. Really.

