Skip to main content

Posts

Showing posts from 2016

Wearable Health Monitors - Patches

Now that fitness watches and armbands and other devices are commonplace, there is more progress on the development of medical grade devices which are smaller, less obtrusive and collect still more detailed information. Patches like The Holst Centers’ next generation patch ( information here )  is equipped with multiple sensing capabilities. It incorporates an accelerometer to monitor physical activity, ECG technology to record cardiac electrical activity, and is also able to track body temperature, respiratory rate, and body composition. So too should Vital Patch from Vital Connect ( information here ). These products promise to increase the health care data collected by both organizations and patients, since it will push patient monitoring to the outpatient setting. These devices can provide continuous outpatient data of a size, scope and resolution that will be well suited to big data techniques (machine learning, etc). Here’s a look at how it can be used . The hardest questions or

SQL Resources, or Show Me The Data!

As I am pretty sure was said, loudly and repeatedly in the movie Jerry Maguire: “Show Me The Data!” It is the Data Scientists Mantra... Data is in our name and really you need data to do your work, and we often have a singular place to store and find all our data (a data warehouse) for the work we do. But of course, the better the tools you have to easily group it, subset it, order it and otherwise transform it, the more insights you can reveal with the rest of your skills. To command all the power that the data warehouse offers and that your analytical work deserves, having a solid grip on SQL (Structured Query Language) is key. It will make your life easier, happier, and simply more wonderful. So, here are some tools to aid in that quest. Books First of all, I would like to introduce you to O’Reilly books, mostly because of 2 titles I have found repeatedly useful: SQL Pocket Guide – A Guide to SQL Usage, this slim volume helps with the details of syntax and all

Being out of the box

Often being in a box is a matter of point of view. Oftentimes when I'm trying to think of ideas and solutions, and I feel stuck, I remember ask myself the "who, what, where, why, when, and how" types of questions . But when I don't remember that tool for thought, I'm  lucky enough to be working with a group of people who regularly show me other ways to think "out-of-the-box" as it were. Today I was asked a question that I tried to answer for a co-worker. They were using R studio and editing an HTML table, and they needed to get some space between some columns. It was a technical issue, and my first idea, adding a non-breaking space to a collapsed column in-between the columns, didn't work. I didn't understand why it didn't work, because in other circumstances it would have worked fine. In fact, the behavior I got seemed entirely wrong and I didn't know why. I knew at worst my solution should have no effect, but that fact that it simp

Healthcare Visualizations

Visualization Tool: Now that we have started looking at data visualizations, it might be of interest to look at Visualizing Health . It is a tool to investigate different types of visualizations, guided by the goals for the visualization. This seems a worthwhile tool for generating ideas. Interesting Visualizations: Look at the "Transitions in Care" infographic . Partners Healthcare It is process-oriented, with time-based measurements as well as qualitative data collected within it. It’s obviously got a target audience, that is expected to pay close attention to it – it’s somewhat dense. http://www.vizhealth.org/ http://qualityandsafety.partners.org/Commitment-To-Quality/Infographics.aspx

JavaScript and JQuery Palettes...

I have been immersing myself in the world of d3js and more, specifically Plotly.js . This has required me to look at palettes, and to create some palettes - which I did with Paletton . I find it tedious, so I am creating some helpers, like the code below which displays a given list of palettes (each of which is simply an array of colors in your favorite format). <table id="Palette"> <tbody></tbody> </table> <script> var defaultColorsPalette = ["#ffd99a", "#225ea8", "#ffc09a", "#9dc4f4", "#ffbf58", "#ffdb58", "#257294", "#ff9658", "#61a1f3", "#ffa719", "#ffce19", "#ff6e19","#ffe99a", "#2a82f2", "#ff9e00", "#ffc900", "#ff5f00", "#036bf0" ]; //via colorweb2 var sequentialMultihueBlueYellowPalette = ["#ffffd9", "#edf8b1", "#c7e9b4",

Visualizations that teach...

I like visualizations that expand my ideas on what a good, interactive visualization is. I particularly like those that hide additional information in plain sight, like this one does . Caffeine, Vitamin D, Green Tea, Fish Oil and a whole lot of other supplements are examined in terms of their interest (popular or scientific) vs. their evidence in interactive, graphical form. At first glance, given the title and it’s apparent simplicity, this balloon graph doesn’t seem to offer much, but it ranks items by evidence and provides links to data, so I think it’s very interesting. http://www.informationisbeautiful.net/visualizations/snake-oil-supplements/

What to Test?

When you are inside the code for an application, often this question doesn't get pondered. It seems like an obvious question, "What to test?" "Duh, everything!" or "What I just implemented."  But really, testing everything is often out of the question for a reasonably complex application, The permutations of states and settings grows quickly. If you have 4 settings which can each be one of two values, that's 16 (2 x 2 x 2 x 2) different combinations to be tested. Add another setting of only 2 choices and you have 32 combinations. If each setting is one of three values, there are 81 (3 x 3 x 3 x 3) combinations.  I think you can see the problem. If you have a good unit testing framework that will let you automate generation of numerous test cases, that can help a lot. But you still need to consider the question and the answer and decide if you are testing the right parts of the application , whether it's unit tests, manual tests, system test

Stabilization, Negative Goals and Cybersecurity

This post from Robert Martin,  Stabilization , along with some recent lectures on Cyber-Security (from MIT's Srini Devadas) came together with the insight that both the "patch & pray" cyber security and the passive stabilization process are each pursuing negative goals. In other words, they are trying to prove the absence of bugs or vulnerabilities. Proving a negative like this is impossible - you'd have imagine and try every conceivable data input or attack vector. Since you can only really prove a positive (when the system get this, it does that) - then as Bob Martin suggests - you need to check that you have high test coverage, and subsequently high code coverage when running those tests - not just x hours of problem free run-time. In the security realm, just because you have a firewall and haven't seen that you've been hacked, you can't simply assume you are safe, you need to test applications for specific attacks, like SQL injection, or by port

Maintainablilty

A question: What does the following code do?  public static string GetThing1(string s)  {       return s.Substring(s.Length / 2 - (1 - s.Length % 2), 2 - s.Length % 2);  } Given that code, take a look at the following, what doe this code do? public static string GetThing2(string s) {     //Given a string return the middle char if odd, middle 2 if even     string retVal = "";     bool even = (s.Length % 2 == 0) ? true : false;     int middle = (s.Length % 2 == 0) ? s.Length / 2 - 1 : s.Length / 2;     if (even)         retVal = s.Substring(middle, 2);     else         retVal = s[middle].ToString();     return retVal; } It probably didn't take too long to figure out they both do the same thing.  They are two different answers to the following question: Write a function to get the middle character of a string. Return the middle character if it the length is odd, or the middle 2 characters if the length is even. Which version took less time to understand? P