Mathematica 10 a topic focused review

I think I'm still in the hobby category, but I crunch a lot of numbers.  Nonsensebox takes a pool of data, makes up thousands of nonsense hypothesis, statistically cross checks them assigning a fitness value, crossbreeds new ones, lets the poor ideas die and feeds in a little randomness.  After a few billion processor cycles - pretty tight models emerge- its a lot like the way real science works over human generations.  Unlike real science the "dogma" is fresh every time it gets run - frequently quirky mathematic systems emerge that appear strongly predictive but not - er - scholarly or conventional.  Except when the newly discovered models are so conventional as to be terribly ordinary. 

So the first thing I should say is that Mathematica 10 adds a number of statistics features that I've built before for myself in mathematica from bits of genetic algorithms, free form associations and poor mans neural net.  This is an odd feeling - mostly things have been done with a better scope than I ever managed but sometimes I'm left wondering. 

To me the direction they are headed with Association[] Classify[] and Predict[]'ions and datasets seems natural until it gets weighed down with cumbersome syntax, sparely duplicated functions that are association specific, and apparent lack of regard to visual formatting.  I like grids, columns, frames and highlights.   I'd like to see long strings of associations formatted so that my brain can work with them.  <|  type->hundreds , of->arrow |> symbols turns me into something akin to a number dyslexic.  Wrap-around spooled text makes eyeball games like "find the thing you're looking for in this list" way more difficult.  

I don't think its just me that needs clear, pretty and highlighted for comprehension-  General Data visualization growl!  Despite that Mathematica 10 provides great updates to chart styles that are situation appropriate for data hounds or board rooms,  I'm a bit disappointed that  {1,2,3,4,S,6,7,8,9}//Colorize reports an error instead of temperature highlighting values and making that 's'  jump out.   Yes, I know I'm using Colorize[] wrong and that it does amazing things to images - just like I know I'm using Multicolumn[associationlist, 6]  wrong.  The new association data types present a problem something like the plural forms of logic and query functions - the query functions generate lists of True and False, while speedy BitAnd[2,3] is not quite the same as BitAnd[{1,0},{1,1}] and BitAnd[{True,False},{True,True}] doesn't compute fully?  

SemanticImport[] is standardized happiness and procedural conformity - thanks!   GroupBy[] does something I accomplished once or twice in a knot of code - thanks much but I'm still slightly annoyed it wasn't built in before (or that I only just  found it in the documentation).  A general complaint about the association specific commands is that they are not generalized.  JoinAcross[] and Transpose[] have deep conceptual similarities.   Perhaps fundamentally I don't quite understand why there's a "just type more code and learn a new way" barrier between array tables and associations.      

Native code seems faster in a few quick checks with Wolfram v10 and a Switch[] heavy program.  Oooo--- ParallelMap[] does magical things when calculations take too long.  I'm not certain the function is new, but it seems to handle spools of HoeffdingD[nonlinear,correlations] about 4x faster than parallel tables in my circumstance- which leaves me a bit confused (is it improved or have I been missing out?) but I practically have afterglow all the same.     

Wolfram cloud is a new addition that seems webby and rental computation centric.  This feature has lots of potential to the right clientele and can do things like pushing a live weather webcam image overlaid with a ski hill's logo and themed by snow accumulation and temperature gauges or weather service alerts.  My intuition says that in many circumstances you'd want to consider owning the evaluation and push or pull to your own web server - still the cloud provides another way and probably isn't targeting my demographic anyway.                 

Quick help, documentation, examples and reference access appears organized and improved.   Mathematica is a branchy mass of beautiful functions - serendipity plays a role in finding ones you need unless you've memorized them all.  Wolfram seems to be pushing my luck in the right direction with semantic help and suggestions - that is much appreciated.  Help still requires effort however:  MovingMap[listfunction,longlist,subgroupingsize] is a 'Old way code tedious nested loops, new way awesome' addition, but despite simplicity and ease of use, MovingMap[] doesn't seem to have many references in help.   

Mathematica 10 adds 700 features including neat looking 3d geometry and the ability to query a PositiveSemidefiniteMatrix - I barely know what they are much less what that implies.    Astronomical Computations and Cartography are likewise welcome additions that I might not ever use in my particular niche.  Then again, knowing a good route between Betelgeuse and AlphaCentauri proxima might come in handy while playing Elite Dangerous... or give me something to happily grouse around if Elite is only advertised as having realistic stars.  

This review sounds pretty negative on Mathematica 10, but the truth is I'm very happy with it.  Yes, I'm going "grumpy old man" in certain areas above.  But I like what's being included as standard modules - writing code that sorts pictures of dogs from pictures of cats doesn't appear to be difficult or require expensive custom code libraries anymore.  Ordinary people with the need could write the script - and that alone is amazing.  And ultimately makes for extraordinary progress, even if it requires the adoption of a painful peculiar new syntax set for associations.  


Sous Vide & Precision Cooking Kinda Sucks & Isn't all that

Sous vide cooking style makes near perfectly cooked anything.   My issue after having spent a fair amount of time at it:  I think one can get exceptional results with old fashion methods.   Perfectly cooked and perfectly tasting are not the same.  Consider bacon- it nearly perfectly encapsulates whats wrong with an encompassing sous vide precision cooking approach.

To use bacon in a sous vide dish, sear bacon, bacon wrap medallion of steak, vacuum seal in bag, cook a half day, open bags, on griddle re-sear the soggy bacon meat medallions  tops and bottoms.  MAP gas torch to crisp bacon thereby adding a undesirable hint of burnt hair & tire to your dish.  Serve something firmly good, but not great.

Deep in your heart, you probably already know, exquisite bacon can be made in seconds by the microwave.

For me, cooking sous vide gives me timing latitude and precision cooking.  But the steps to sear and serve often result in imperfect flavors - the sealed bags over amplify and unbalance spices in unpredictable ways.  Use 1/4 as much spice and seasoning as a starting point but the flavor profiles will still be unfamiliar.  As a healthy cooking fan and chemist I worry a little about the tasteless plasticizers migrating into my foods from polybags soaked in city fluoride water and the high temp skewed Mailard reactions generated by drying direct flame sear.  Looks like synthesis pathway for mystery bioactive trace chemicals.

I've come to the conclusion that there are sous vide winners and losers.  

Sous vide winners:

  • eggs (Perfect eggs be they boiled, hollandaise sauce, poached, custards...)
  • vegetables (intense flavors, long cook times without overcooking, sweetness from starch breakdown, roughly cut style serving without overcooking)
  • Baked potatoes perfection
  • precision pasteurized liquid egg whites, jams, home made french vanilla ice cream 
  • yogurt culture (gallon of milk to a gallon of cultured kefir)
  • time insensitive specialties (you need item Y at a party this weekend and are happy cooking something three days and are fine not being able to use your precision cooker erstwhile) 
  • Where food safety is paramount (For 90% of humanity, this isn't you.  Try the steak tartare - you'll be fine.  To the rest: today isn't a good day to die.)
  • Need to plan a menu for a mix of toddlers, grandparents and orthodontic jaw surgery victims?
  • Catering & party situations - quick grill precooked steaks.


Sous vide losers:

  • Dirty dish haters (prep/precook/cook/post-cook/serve steps = more dishes)
  • Quick meals.   With the possible exception of fermentation, time alone doesn't make things tasty.
  • Microwaved bacon.  Broiled cookie sheet bacon for crisp flat bacon lovers. 
  • Baked soufflé.  Julia Child's Cheese egg soufflé with a favorite cheese and folded whipped whites is hard to best, uneven cook or not.   (With deep apology to spirits offended: swiss cheese is not my thing, substitue a favorite.)
  • fish (consider butter broiled, drained and served on a sprinkle of crushed saltine crackers w lemon wedge and fresh dill)
  • steak (consider crushed garlic/black pepper/olive oil balsamic emulsion/rosemary sprig marinade and grill.  The marinade may catch fire - that actually improves the flavor by taking the edge off the pine taste of rosemary.  Turn the burners down until the fire subsides and continue grilling)
  • pork chops (uncured pork products are best pressure cooked for fall apart texture in 45 min vs 48 hours.)  But my favorite is pan fried (chicken bullion, rosemary & black pepper predust, tapocia n water n egg batter followed by flouring with mostly flour, some salt, green onion flake and garlic.)  Pan frying flavor is hard to best unless your menu is based around jaw and tooth problems.      
  • chicken (consider stir fried or pressure cooker 2.5# frozen breasts, dice & saute 4 onions & 4 celery stalks in olive oil, add 2 bottles of beer and 1 round teaspoon better than bullion chicken.  Pressure cook 35 minutes @ 15psi (timer starts at temp).  Cool kettle in water bath 10 minutes.  Drain.  Salt and pepper to taste, serve whole or as BBQ pulled chicken by fork shredding in broth before draining and serve with BBQ.)
  • Roast While I like fall apart pressure cooked roast, my wife objects to the hint of hospital "autoclave" aroma.  Likewise she is not a fan of sous vide roast as the aromas and flavor skew strangely.  The traditional dutch oven or sealed slow cooker offers very good and very traditional results in five to eight hours.    

Tessa Colors.nb, a Gift to the Public Domain

(*Tessa Colors is inspired by Andy Warhol's 4x4 screen prints.  Code creation by Dustan Doud as gift to the Public Domain 2O14.   Written in Wolfram Language.  The program is only about 13 lines long.  One file in - ~124 files and color variations output.  Paste this article into mathematica to run.

Program Description :
Load one image, get many colorful variations.  You'll need to edit the setyourdirectory to match your file location, and likewise save to a reasonable spot.  Hint:  view the  variable frame and edit intresting images accordingly.  Speedy enough on a modern computer, but probably not ideal with 200mb pictures and a Raspberry Pi computer.*)

inputimage = Import["/setyourdirectory/picturefile.jpg"]; is =
frame = Table[
  ImageAdjust[ImageSubtract[is[[a]], is[[b]]]], {a, 1, 3}, {b, 1,
   3}]; (*view frame and select four of nine images within interesting images*)


interestingimages = {frame[[2]], frame[[3]], frame[[6]], 

  frame[[7]]}; list = Permutations[interestingimages, {3}];

mommix = Table[ColorCombine[list[[a]]], {a, 1, Length[list]}];

momremix =
  Table[ImageAdd[mommix[[a]], interestingimages[[b]]], {a, 1,
    Length[mommix]}, {b, 1, 4}];

mk = Flatten[momremix]; 

Table[Export["/setyourdirectory/Mom0" <> ToString[loop] <> ".jpg",
  milkkids[[loop]] ] ,  {loop, 1, Length[momremix]} ]; Table[
 Export["/directory/Moms" <> ToString[loop] <> ".jpg", mk[[loop]] ] ,  {loop,
  1, Length[mk]} ];


Kindergarden Challenges Facing Purple, Green and Orange Skinned Minorities

My daughter T. made a survey as her art project for a project fair.  I had made a Andy Warhol / Marilyn Monroe inspired digital screen print color mix matcher (See Tessa Colors).   One photo in (in this case, her mother in Kindergarden) and ~120 photos with color modulations came out.  She thought some of the prints were silly, happy or scary and used them for her really so unstructured project that I should of been a helicopter parent.

Here are the results of her survey:  


Clearly, purple and gray-green skinned little girls get no love - at least compared to that popular blue haired pink girl or the brightly colored cyan kid with the orange hair.  

I'm not certain what any of this means; ultimately its hard to put much stock in the preferences of nine 5 year old kindergardeners.  

....A neighbor read the poster and made an appeal against racism.  

The notions that there is one best race and the person that has those feelings conveniently happens to already 'be on the winning team,' as it were, seems widespread and something fundamentally flawed in many people.   My work with genetic algorithms makes me intuit that genetic diversity makes humanity stronger.  The whole of human genetic diversity can nearly be summed up in a village of 60 unique people.  That's not a healthy amount of genetic diversity in a species.  From a computational genetics standpoint, that looks dangerously close to a evolutionary dead end where humanity eventually faces extinction by failing to adapt to a virulent pathogen.  

So to my daughter T:  When it comes to people, there never has been one best kind.  Diversity makes populations stronger and keeps humaity alive.  And when it comes to hair and clothes, hands down go with pink.


Thumbs up on the Anova Sous Vide

If you love to do your home cooking in a pissy-complicated "get out the gram scale" kind of way just like me, then the Anova Sous Vide machine is a practical two hundred dollar investment.  Perfectly perfect medium rare dry seasoned steaks ala ziplock (55C for 1 hour) or fantasticly moist chicken breasts (62.8C for 80 minutes).  Just finish with a quick sear under the map-gas flame thrower to your choice of color, then salt and drizzle with a 39:1 mix of butter and white truffle oil.  

Easy peasy.  

Especially if you are doing your cooking in your stainless sink!  Cleanup: Pull out the anova.  Add dishes and soap, give em a long soak, then a scaldingly fast dip to pull the drain plug out, and load dishes into the dishwasher.

Seriously, neat product.


Rag noodle shrimp primaverde.  I realized this recipe is mine.  So I share:

In sous vide pouch at 140F/60C about 40min:

1 pound shring, raw.

4 tab butter.

1 clove garlic, intact but top and bottom 1/8th cut off

2 tablespoons Wondra instantized flour + 1/2 tablespoon flour

1 teaspoon better than bullion chicken

1.25 cups water.


After setting up sous vide,

 set up a seperate wok to boil water for cooking noodles ~ 2 quarts.  


Now make the noodles:


Blender:  Chop 1.5 cups flour and 1.5 tablespoons butter.  Add 3 eggs and 1/2 tsp salt.  Blend into dough.  

Countertop:  Roll dough into (~20sheets of paper) thin sheet.   with lots of extra flour to prevent stickyness.  Employ child labor if available.   They do like to help, even if they complain, and if they help cook, they are more likely to eat.

Cleanup countertop.  Again, employ child labor if available.  This also ensures that the child will almost certainly pull a 'sneak-away' after counter cleaning keeping them away from boiling liquids in the next step.    

In wok:  Tear coarse flat noodles and drop them into boiling water.  Cook 5 minutes.  Add half a bag of frozen vegetables, birdeye mix of carrots, asparagus, diced peppers is great.  Reheat just to a boil.  Drain off liquids.

pour sous vide shrimp and sauce from pouch into wok.

Mix and cook high heat until sauce just boils - about 2 minutes.  Turn off heat.  Thicken by sprinkle of 1/2 extra tablespoon flour if needed.   Add pepper or itallian herbs to taste and serve