Welcome to the IdeaMatt blog!

My rebooted blog on ... who knows. Feel free to get in touch with me if you have thoughts, questions, or want to get involved. Cheers! -- matt


An RC Weather site update, plus a micro visual language

I continue to greatly enjoy developing my simple "at a glance" weather app for outdoor activities. Currently it's located at the default Heroku development domain rc-weather.herokuapp.com, but I should probably register a domain and get things configured to use it (feedback has been positive). The first thing I love about this project is the simple joy of writing a web application. I've barely dabbled with the fundamentals in the past, but it feels like I'm getting in touch with my Internet geek heritage. HTML, CSS, a little JavaScript, web frameworks - all tasty and relatively straightforward, modulo the quirks that come from the web's organic development.

My first prototype was in Groovy and Grails, mainly because I wanted to explore that language and framework, but it was soon apparent that they were overkill for this app, which has no data model at all! So I switched to Python, a language I'm fairly comfortable with from work, and Flask for the back end. What a breath of fresh air! I continue to enjoy Python for all the usual reasons (dynamic typing, interactive shell for exploring, huge inbuilt and third party library, etc.), and Flask's model is so clean - simply annotated routes, practical templating, useful plugins, and an included development server that makes a sweet web "REPL" workflow - save files and then reload the browser page.

Other tools

Heroku's hosting is pretty slick. Once you figure out the basics (Procfiles, requirements.txt, runtime.txt for Python 3, and of course the ever-painful Git), updating the site is just a 'git push heroku master'. Of course this app is dead simple (no database), but Python + Flask on Heroku is productive.

Templates: I'm using the included Jinja2 templates, which work fine so far. The MVC is clean (routes include objects as keywords in their returned renderers) and the features are adequate so far.

Style: So far I've been focusing strictly on functionality, so the site looks like a vanilla HTML one, but I'm excited to learn Twitter's Bootstrap for the front end. I'll likely use JQuery for interactive features, and some kind of UI library. I'm intrigued by D3 , though it's more of a nail looking for a hammer (if that strained metaphor makes any sense). Basically it's cool and I want to use it for something :-)

And the basics: The awesome IntelliJ IDEA, Aquamacs (Emacs familiarity is from my NASA AI and Symbolics days early in the Shuttle program), the Mac OS X Terminal, and Firefox with its yummy developer tools.


I tend to be a lone wolf, but I realize that it leads to major limitations in finished products. So it's been gratifying and productive to get help from a few sources, including a small group at the HeliFreak forums (the active post is here), my brother and fellow programmer Dave, and a few colleagues here and there.


Really, there are only two non-technical intellectual challenges that I see: 1) the function that computes an hour's color based on the weather parameters (probability of precipitation, wind, apparent temperature, and soon cloud cover), and 2) how to indicate visually this information in an weekly calendar format.

For number one, right now it's a simple three step process (summary and ASCII Vision (TM) here): Give each parameter a low/medium/high desirability rating based on ranges, combine them into one of four hourly ratings (poor, fair, okay, or great) using simple logic based on counts, and map each directly to a color (CSS). I need to change the second function to handle a fourth parameter (cloud cover), and add support for weighting the parameters somehow. It's clear from the forums that customizing these is important because personal preferences vary. Right now I have a form for editing ranges, but sliders are appealing, esp. if they update dynamically the colors.

Number two is more interesting. How does one show each hour's overall rating along with information about the individual parameters' contributions without cluttering the display? I think it's correct to call this a micro visual language, one that has to convey "How good is that hour and why do you say that?" My initial idea was a weekly grid of colored squares like this:

An obvious approach is keeping the square empty except for color, and supporting an interactive exploration of each, say by having an information panel that shows detail for the hour that the mouse is over. But I'm resolute about putting all information in each cell because I don't want to have to search to understand the overall picture. This will be probably be more mobile-friendly too.

I played with adding unlabeled small bars at the bottom of each square, but relying on position to indicate the parameter was confusing. I suppose I could have used a graphics editor to create the prototype, but I programmed a random selection of squares using of Pillow ("the 'friendly' Python Imaging Library fork"). Here's the one I did:

My present solution - not especially novel - is to place icons representing the troublesome parameter inside of each square. Finding good ones is a challenge, but I think my 0.1 icons from erikflowers.github.io/weather-icons are, in Alan Kay's, "good enough to criticize" *:

Can you intuit the icons' meanings? Here's the key:


Personal value of the project

The primary value to me of this coding experience is the creative act of bringing an idea into (virtual) reality, an idea that ideally provides something of value to people. As an engineer at heart, making useful artifacts is what I thrive on, and this is a tiny expression of that. It's is bringing some meaning to my life outside of work, which is welcome.

Anyway, I'd love your thoughts and ideas on any of this.



Using Grails to Make a Simple RC Weather App

I've been flying remote control helicopters (the acrobatic collective pitch ones, not 'drones') for over three years now, and I still get a lot out of the hobby. Recently I had an idea for a simple site/app that lets outdoor hobbiest get an at-a-glance view of how good the hourly weather looks for the extended forecast in their neck of the woods, and I've decided to implement this using Grails (with its somewhat steep learning curve). Another group at UMass uses it, and this app idea seems like a good candidate for learning Grails. I hope to blog a bit about the process, so here goes.

Goal: Show a summary of weather conditions for particular US zip code that quickly indicates the desirability of outdoor flying conditions in the next ~seven days. Along with the zip code, input would include (or default to) minimum temperature (optionally factoring in wind chill - say 40 °F), maximum wind speed (say 8 MPH), maximum precipitation potential (say 10%), and darkness.

User Interface: I haven't given much though to the UI, but maybe I'll start with a simple table of days on the x-axis, hours on the y, and cells that contain a visual encoding of the hour. This might be a simple "stoplight" red, yellow, and green, or something more exciting like Chernoff faces (via Edward Tufte). Hovering or clicking might show details.

Similar apps/sites: I was surprised that I didn't find many similar apps after a moderately-serious search. Weather Wardrobe demonstrates the basic idea for the current forecast (enter zip code, get an purpose-specific summary, how to dress appropriately in their case (e.g., "If you are in 01002, you should wear a heavy jacket over long sleeves and pants. Put on a hat and gloves.") I like it. The other is an iOS app called Windsock that's sophisticated but that is unavailable. It looks like they've nailed the concept, though.

This app may not be broadly exciting, but it'll be a fun excuse to learn Grails and maybe provide something of value to the hobby.

(Image credit: Discussing the Weather by Hartwig HKD)


Returning to my IdeaMatt Roots

With this post I'm back to blogging, at least a little. :-) My nascent plan is to go back to my "IdeaMatt" roots and widen the topics to include technical posts (I've been working in a UMass research lab for the last three+ years), atheist/skeptic/rational thinking, and maybe some Experiment-Drive Life/Think, Try, Learn ideas. Generally I'm still enthusiastic about ways to use our brains to be happier, better people and Earthlings.


Hey - I'm published! Check out "Mindhacker: 60 Tips, Tricks, and Games to Take Your Mind to the Next Level"

A gigantic congratulations to Ron and Marty Hale-Evans on their great new book, Mindhacker: 60 Tips, Tricks, and Games to Take Your Mind to the Next Level. From the Wiley press release:

Ever wish you could tinker with your brain the way you can with your computer, to make it run faster, stay better organized, and get more done? Upgrading your brain's "software" can dramatically escalate your personal productivity, improving such skills as efficient learning, personal organization, time management, mental control, creativity, and decision-making.

For those looking to improve their mental skills, authors Ron and Marty Hale-Evans deliver a witty, compelling, and action-oriented cache of personal productivity tips and techniques in Mindhacker: 60 Tips, Tricks, and Games to Take Your Mind to the Next Level (Wiley; 978-1-1180-0752-5; September 2011). Readers can tune their brains to peak performance by using this array of clever, practical techniques founded in current research.

I'm fond of this book for three reasons. First, I loved Ron's book Mind Performance Hacks: Tips & Tools for Overclocking Your Brain, which, if I adopted a tenth of the techniques would make me a genius. Second, I had the pleasure of interviewing Ron in my post A conversation with Ron Hale Evans, author of "Mind Performance Hacks", which I enjoyed very much. But most exciting is that Ron asked me to contribute not one but two (!) hacks to this new book:

  • Hack 21: Get Control of Yourself. Lost control of your life? Get back in the driver’s seat with Jetpack, the pocket-sized system for managing your work and freeing up your brain for better things.
  • Hack 54: Think, Try, Learn. Live life as a series of scientific experiments.

Working with Ron and Marty was a pleasure, and it was quite an experience having professionals help me create writing that was tight and industrial strength. I'm tickled pink to be included.

Their product page is here, and the Amazon link is here if you want to buy a copy. And as a special treat to you, dear reader, you can download the PDF of Hack 54.

Happy experimenting!




Keeping motivated in your self-tracking

Measuring West I recently received an email from someone having trouble keeping up with her experiment. While there is lots of general advice about discipline and motivation, this got me thinking about how doing personal experiments might differ. Following are a few brief thoughts, but I'd love to hear ways that you keep motivated in your quantified self work.

The desire to get an answer. The main point of an experiment is to get an answer to the initial question. "Will a Paleo diet help me manage my weight?" "Does talking less bring me closer to my kids?" Maybe the principle at play is that experiments which motivate start with great questions.

Built-in progress indicators. If you've set up your experiment well, you should have measures that come in regularly enough to keep you interested. This is assuming, of course, that you care about the results, i.e., that you've linked data and personal meaning (see below). But unlike other types of projects, maybe we can use the periodic arrival of measurements to stimulate our motivation, such as celebrating when new results appear.

The joy of satisfying a mental itch. Curiosity is a deep human motivation, and experiments have the potential of giving your brain a tasty shift - such as when you are surprised by a result. I especially like when a mental model of mine is challenged by a result. Well, sometimes I like it.

Sharing with like-minded collaborators. At a higher level of motivation, experimenting on yourself is an ideal framework for collaboration with folks who are either 1) interested in your particular topic (e.g., sleeping better or improving your marriage), or 2) are living an experiment-driven life. It is encouraging to get together with people to share your work, and to receive support, feedback, and ideas. Of course it feels good to so the same for them.

Desire to make a change. Finally, if we come back to why we experiment, there should be a strong self-improvement component to what we are tracking. My argument is that, ultimately, it's not about the data, but about making improvements in ourselves for the purpose of being happier. If the change you are trying is not clearly leading that direction, then it might make sense to drop it and try something more direct. Fortunately, with self-experimentation there is usually something new you can try.

Underlying all of these, however, is the fact that the work of experimentation takes energy. Every step of an experiment's life-cycle involves effort, from thinking up what you'll do (creating a useful design), through running the experiment (capturing and tracking data), to making sense of the results (e.g., the "brain sweat" of analysis). Given our crazy-busy lives, there are times when we simply can't take on another responsibility. So if you find yourself flagging and losing interest in one of your self-experiments, then maybe that is itself some data. Thoughts?

[Cross-posted from Quantified Self]