Daily Fitbit stats

My fitbit #Fitstats for 11/21/2014: 7,897 steps and 4 miles traveled. http://www.fitbit.com/user/22TH4Q

Posted in Uncategorized | Leave a comment

Daily Fitbit stats

My fitbit #Fitstats for 11/19/2014: 6,525 steps and 3.3 miles traveled. http://www.fitbit.com/user/22TH4Q

Posted in Uncategorized | Leave a comment

Daily Fitbit stats

My fitbit #Fitstats for 11/13/2014: 10,496 steps and 5.4 miles traveled. http://www.fitbit.com/user/22TH4Q

Posted in Uncategorized | Leave a comment

Daily Fitbit stats

My fitbit #Fitstats for 11/11/2014: 9,730 steps and 5 miles traveled. http://www.fitbit.com/user/22TH4Q

Posted in Uncategorized | Leave a comment

Daily Fitbit stats

My fitbit #Fitstats for 11/07/2014: 6,665 steps and 3.4 miles traveled. http://www.fitbit.com/user/22TH4Q

Posted in Uncategorized | Leave a comment

Daily Fitbit stats

My fitbit #Fitstats for 11/04/2014: 6,723 steps and 3.4 miles traveled. http://www.fitbit.com/user/22TH4Q

Posted in Uncategorized | Leave a comment

MVC SVG Tutorial (Sample code)

We all know that it is best practice in a responsive world to use SVG, but this is slightly more complicated within the MVC Razor view engine. Since SVG files are recognized as xml files and not image files other steps must be taken. Here are the steps to get SVG working in your MVC Application:

  1. Add some SVG files to your solution.
    I like The Noun Project for my icons so I am using a Factory from Amelia Wattenberger.  There are a lot of sources for getting and or making your own SVG. I’ve talked about them previously, and I recommend Inkscape since it is very full featured, free, and has plenty of good tutorials. I have also found it helpful to build out the raw image in Power Point and then go to image.online-convert.com to convert your simple image to something that is closer to what your looking for..
  2. Add this Helper to your Solution:
    1. using System.Collections.Generic;
    2. using System.Reflection;
    3. using System.Xml;
    4. using System.Xml.Schema;
    5. namespace System.Web.Mvc.Html //<– Note this namespace!
    6. {
    7.     public static class HtmlHelperExtension
    8.     {
    9.         public static MvcHtmlString SVG(this HtmlHelper htmlHelper, string path, object htmlAttributes)
    10.         {
    11.             Dictionary<String, Object> attributes = new Dictionary<String, Object>();
    12.             var fullPath = HttpContext.Current.Server.MapPath(path);
    13.             var xmlDoc = new XmlDocument();
    14.             xmlDoc.Load(fullPath);
    15.             string xsi = http://www.w3.org/2001/XMLSchema-instance&#8221;;
    16.             XmlSchema schema = new XmlSchema();
    17.             schema.Namespaces.Add(“xsi”, xsi);
    18.             PropertyInfo[] properties = htmlAttributes.GetType().GetProperties();
    19.             foreach (PropertyInfo propertyInfo in properties)
    20.             {
    21.                 if (xmlDoc.DocumentElement.Attributes[propertyInfo.Name] != null)
    22.                 {
    23.                     xmlDoc.DocumentElement.Attributes[propertyInfo.Name].Value =
    24.                         (string)propertyInfo.GetValue(htmlAttributes, null);
    25.                 }
    26.                 else
    27.                 {
    28.                     XmlAttribute xsiNil = xmlDoc.CreateAttribute(propertyInfo.Name, xsi);
    29.                     xsiNil.Value = (string)propertyInfo.GetValue(htmlAttributes, null);
    30.                     xmlDoc.DocumentElement.Attributes.Append(xsiNil);
    31.                 }
    32.             }
    33.             return new MvcHtmlString(  xmlDoc.OuterXml);
    34.         }
    35.     }
    36. }
  3. OutputinChromeAdd this where Where you want your SVG to be Displayed. at this point it becomes a bit of a preference discussion. However the standard for choosing which tag to use tag seems to be: prefer object over embed. The helper above is to include the svg in the rendered HTML (without either the object or embed). The reason I choose this approach is multi-fold:
    • The object/embed approach is simple enough that you don’t really need the overhead of an Html Helper.
    • The helper can get inside the XML and make modifications on the SVG which makes it more extensive.
    • Syntactically it is more in “tune” with the Razor View Engine.
    • Better to reduce/reuse code.

    here is how you would use the HTML Helper:

    1. @Html.SVG(“/Images/icon_10948/icon_10948.svg”,
    2.        htmlAttributes: new { width=“351″, height=“257″ })

    And here is a comparison of the footprint of all three approaches:SVGodePicture
    It is easy to see that the HtmlHelper is a good compramise between the verbose and hard to maintain XCopy of the SVG XML into the cshtml file. and it is also shorter than the object approach.

I hope this helps you Happy Coding.

Posted in Code, Code Sample, Programming, Snippit, Tutorial, Uncategorized | Tagged , , , , , | Leave a comment

Infographic Misdirection and Bias Influencing


From the article  By Brandon Bailey

From the article
By Brandon Bailey

When I saw this infographic it instantly stuck me as off. I had to look very closely to discover exactly how it was misleading me. This article is clearly biased in the favor of Google, the info depicted here implies market share or importance of development to the observer. It becomes very clear that the author didn’t dig for breadth and this infographic is a much better representation of the viewpoint and focus of this articles author as opposed to the state of industry. There was no comment on Qualcomm Zeroth processors, and all of the approaches describer herein use CPU & GPU approaches not NPU.  Perhaps the blame should go to Doug Griswald the artist, please Doug read my post about infographics and data representation before you make another.

At the very least this infographic should have been in chronological order (which would put Microsoft as the last “achiever”), but to give the companies different sizes.. Come On man.. Seriously..

  • Integrity -1
  • Professionalism -2



Posted in Artificial Intelligence, Computers and Internet, Digest, News and politics | Tagged , , , , | Leave a comment

Static Library vs Dynamic Linked Library (Lib vs. DLL)

The Kool Aid:
“Using dynamic linking instead of static linking offers several advantages. DLLs save memory, reduce swapping, save disk space, upgrade easier, provide after-market support, provide a mechanism to extend the MFC library classes, support multilanguage programs, and ease the creation of international versions.”


-This is a code “bundle” inside your .exe


-This is a stand alone unit of code.

  •  Code is always loaded with the executable
  • Can speed up app load time
  • Small hit when the .dll loads
  •  Can be deferred at App load time
Compiled Size
  •  Larger file size for .exe
  •  Many smaller files
  • Can only be used at compile time.
  • Not prone to versioning problems.
  • You will need to take extra steps to get the PDB’s rolled into the DLL PDB
  • Must update each product which uses it separately
  • Fights incompatibility issues
  • requires you to replace the exe for upgrades.
  • Some say Lib’s make it easier to support many platforms
  • Modularity
  • Can Be used by multiple Applications.
  • Can speed up development (reduced compile time)
  • Can cause versioning problems.
  • Can upgrade all products at once if dll is shared across product lines
  • Forces you to update all related projects and can cause compatibility maintenance issues across your organization.
  • Allows you to upgrade the application by replacing just the dll.
  • Can make it easier to support new hardware or hardware changes
  • Used by the compiler at compile-time.
  • Results in 1 Large file.
  • Avoids dependency issues
  • Compiled and called at runtime.
  • Results in many smaller files.
  • Can be stored in the GAC
  •  All iOS binaries are static libs
  • Original implantation was the origin of DLL Hell
  • Your Exe will produce a minimal Lib file at compile time to link to the dll
  • Allow a game to easily support mods.
Architectural Consideration
  • Special care need to be taken when internal dependencies are not straight forward.
  • Allows for inter-process communication
Legal Implications
  • If you use an LGPL library statically your code automatically becomes Open Sourced
  • If you use an LGPL library then you only have to open source the changes made to that library/
  • Everything is internal to the exe, thus contained
  • Data can potentially be ‘hacked’

If you are developing for windows 8 (win8)  then the quick answer is use a DLL

If your Developing for iOS then use a Lib



Posted in Uncategorized | Leave a comment


Back in 1997 I took my first organic chemistry class, and in it we discussed the origins of organic compounds in a primordial soup. Ever since then I’ve had interest in the origins of life, “genetics”, knowledge transmission and of course Xenobiology. I had considered going to a school in Florida that offered a xenobiology program, I didn’t yet that too has always been a decision that I feel could have changed many thing on my view of self. Realistically the field is an odd entity to exist inside the sciences, and perhaps would be better suited to a liberal sciences department that also studies the paranormal, Numerology, and meta-consciousness.

On 4 November 2013, astronomers reported, based on Kepler space mission data, that there could be as many as 40 billion Earth-sized planets orbiting in the habitable zones of sun-like starsand red dwarf stars within the Milky Way Galaxy.[11][12]


It is a fun exercise to revisit once in a while. Astronomers say that 1 in 10 stars has a Goldilocks planet. And if you assume that “Life as we know it” is based on a phospholipid bi-layer enclosing self reproducing reagents then you take into consideration the number of rain drops from a single rain-cloud releasing it’s burden over a puddle that has had oils build up on it’s surface ( or ocean spray or waterfall droplets…etc) then the chances that a Goldilocks planet has long chain hydrocarbons and doesn’t have micelles is infinitesimal! So what about sugars? Well scientists have found sugars in nebular clouds and on asteroids. And we know that planets are accretions of these interstellar. Bodies so it stands to reason structurethat there are sugars on these planets (DNA is sugars with a phosphate backbone). Things like sodium, phosphorus, nitrogen and oxygen  can be found right next to the sugars store mentioned in deep space so they would accumulate along with everything else trapped in that Goldilocks’ Hilbert sphere. And just on the law of diffusion (entropy) our sugars oils and other gasses & minerals would   come into contact with one another. So the setting is right.

But what is it that really makes “LIFE” ? Most people would say the ability to reproduce and or pass along information.    O.k…? What does that mean? “knowledge” at it’s most mathematical level is most easily described as reverse entropy or perhaps more discreetly as the coefficients of reverse entropy (snap shots in space time of pockets of order) and unlike “nonliving” things these pockets of order don’t spontaneously disperse, they grow in magnitude and become more ordered patterns of ordered things ( think a mass of cells).  What then is learning? Well we say that plant cells learned to use chlorophyll, but what we really believe is that proto-img15plant cells ingested chloroplasts (and perhaps other cellular components) and found it more beneficial to not eat then but to nurse from them and “farm” them { if you will }. So in thus case “Learning” was a matter of perhaps a detrimental issue (a lack of digestive system) that lead to the happy accident that resulted in invagination And propagation of chloroplasts ( which were no doubt a competitor at that time of what we would come to call the proto-plant cell.
So learning at it’s most basic is still a matter of perspective. Inside the chloroplast the pancake like structures have “evolved” to be wonderful sugar makers and light absorbers. They didn’t start that way but over time the chloroplasts that produced the right protei53076-004-61A5272Ans to make that structure get to live longer (presumeably because the cell nursing on it could last longer between meals due to the ready supply of sugars) and those who were slightly less strong would end up running out of energy and become dinner.  This is evolution! Is it also “Learning”?

Certainly we are reducing degrees of freedom in this space and conferring those reduced dimensions to our progeny so yes we have the most basic form of knowledge transfer structural (and possibly related to that genetic). Then as we scale our systems up we see that at a certain point “Learning” takes on new meanings. It is the scale of the dimensionallity here that now becomes meaningful and treacherous at the same time. Is it learning for cells to come together for protection “flocking” into biofilms for example. The film is more than the sum of it’s parts, and yet it’s parts may be very basic. Do we call it learning when one organism stats producing adhesives  to attach to other cells? Or is this just a byproduct of wanting to be more stationary with the added benefit that your neighbor is a filter feeder which circulates food past your mouth for you? (“Lazy 0r Lucky Learning”?)

These types of scale & scale boundary  questions it seems have become pervasive  across a wide variety of disciplines.  perhaps most widely discussed is the quantum classical barrier ,but we find them in places where there are discontinuities between one way of  understanding and the next. Even when it comes to classification of extrasolar xenomorphic societies we have discontinuities, but in this case it can help us understand that we as humans need to categorize things to make them comprehensive.  Thus we come round circle to semantics and belief.

Posted in Leisure, News and politics | Tagged , , , | Leave a comment