Cognitive offloading? Nah, go with the *flow*.

Posted on 18 February 2014 by Joseph

Every so often, I see a blog post about removing choice and effort from your life in order to focus on what is "most important." These articles cite things like Steve Jobs wearing the same black turtleneck every day as ways to ease our cognitive load, improving our ability to think and reason on issues more critical than our clothing choices.

Indeed, this type of thinking has even evolved into a sort of life-optimizing startup culture. It's not enough to use a dishwasher and wear only jeans and hoodies; now Soylent even aims to remove the need to prepare food for ourselves. These are all seemingly valid ways to remove some of our cognitive load, but are they the correct way to approach the ultimate problem we are trying to solve? In other words, does offloading some of our daily cognitive load really help us better focus on core problems?

In his book Flow: The Psychology of Optimal Experience, Mihaly Csikszentmihalyi explores some of the research surrounding happiness. One conclusion is that humans are at their happiest when they are in "flow." Flow is the mental state you experience in which you are completely absorbed with the task at hand. The following conditions need to be met in order to experience a state of flow:

  • You are doing an task with clear goals and obvious progress.
  • You have clear feedback on how well you are doing.
  • You are confident that you can complete the task.

There are also a couple things that can help you stay in flow:

  • The task is perceived as challenging.
  • There is little to nothing to distract you.

As mentioned above, we humans are at our happiest when we are in a state of flow. Another nice side effect is that we efficiently accomplish our tasks at hand when we can enter the flow state. In fact, I'd guess that what most of us would claim to be after in our daily work life (and perhaps especially for startup founders) is to spend as much time as we can in the flow state, working on our problems.

But as we are so often reminded, work isn't everything. The so-called work-life balance is a constant source of conversation, and not just among entrepreneurs. Interestingly, the research on flow applies equally well to preparing dinner as it does to building our products. That is, we are at our happiest when we can achieve a flow state regardless of the activity. For me, this means trying to cultivate an interest in my daily activities outside of work in order to better set myself up for flow. Though research is unclear on this, it may very well be the case that by "practicing" our flow, we can achieve something akin to the autotelic personality.

Even if we can't, though, I'd rather spend my evenings trying to craft the perfect omelette instead of "offloading" my dinner choices to Soylent. In general, while shedding cognitive load may help us better focus on what we deem "important", I feel like it shouldn't come at the expense of the vibrancy and wonder of everyday life. By trying to cultivate a state of flow in all things, we can discover all sorts of things that are seemingly mundane but actually fascinating.

I was once wrapping some gifts with a friend of mine. As usual, I was rushing through the process of wrapping my gifts. As a result, my wrapping was ugly and slipshod while his was neat, clean, and elegant. I remarked at how hard it was to wrap gifts, and how good he was at it. He responded with some advice that I won't forget: "It isn't really hard at all. You just need to have some craft."

How many throw-away tasks, like wrapping gifts, do we go through each day? Tasks that we rush to complete because we feel they don't matter - washing dishes, cooking dinner, even hanging out with our friends - and in doing so, don't really apply ourselves completely? Taking this approach to our daily tasks ensures that we won't enter the flow state.

Instead, try and see each task as an opportunity to have some craft. Make your daily activities into challenges. Take the time to wrap your presents neatly and beautifully. Wash the dishes as efficiently as possible, and try to use as little water as is necessary. Try and build dialogues with your friends and family rather than just sitting swilling beer (this one is a little close to home). By insisting on having a little craft in all things, we build an environment conducive to flow, and ultimately increase our happiness. And who is to say that that happiness doesn't feed back more positively into our work life than the shallow value gained by offloading these tasks?

2013 Roundup

Posted on 18 February 2014 by Joseph

This year has been a year of much growth for me, and though ultimately I didn't complete all my goals, I did try a bunch of new stuff, some of which I really liked.

Goal review for 2013

  • Lifting goals. With my primary climbing partner out of commision with a new son, at the beginning of this year I decided to try to focus on some powerlifting goals to switch things up in the exercise department. Having done (self-directed) Crossfit for a couple years prior, I had a good foundation for the primary lifts I wanted to focus on (squat, deadlift, press, clean, snatch), as well as having a decent base to start from.

    My lifting buddy and I set out on the road to swoleness with a copy of Starting Strength, the best place to start as far as I can tell. My lifts immediately started progressing, and I became more confident in my form. The most surprising thing to me was the effect of diet on lifting. If you want to get stronger, really a lot stronger, eat as much as you possibly can! For me, that meant trying the GOMAD thing, which, incidentally, really works.

    Ultimately, it's all about the numbers. In 3 months of the 'beginner' programming from SS, my lifts went:

    • Squat: 295 -> 320
    • Deadlift: 295 -> 345
    • Press: 145 -> 155
    • Clean and jerk: 205 -> 225
    • Snatch: 165 -> 185 While not quite hitting the 2X bodyweight goals I had for myself, I felt good about the gains.
  • Reading. I set out to read 50 books in 2013, and as of today I have less than 100 pages left in the 50th. So close. I read some really excellent works though, both fiction and nonfiction, as well as exploring graphic novels a bit. Some favorites are:

    • A Canticle for Leibowitz - Walter Miller, Jr.
    • Feeding the World - Vaclav Smil
    • The Notebook, The Proof, and The Third Lie by Agota Kristof
    • Everything ever written by Milan Kundera
  • Get my spending way down. Late last year I started reading Mr. Money Mustache, and the whole 'eschew materialism in favor of doing things you love to do' concept stuck with me. I spent the first part of this year getting my spending in check, and at this point I am spending between $1,000 and $1,200 a month, with my yearly costs factored in. This is a far cry from where I started, and I must say it feels very liberating to acquire almost nothing.

    Additionally, I decided that many of my things that I already had were nonessential, so I purged hundreds of books, DVDs, musical instruments, kitchen gadgets, and other "stuff" from my life.

    On the other hand, I did acquire something big in 2013: another home. Specifically, I bought a small condo within walking distance to town, and I love it. I burn maybe 1/4 tank of gas per month, and that is almost all in climbing travel. Additionally, I got a good deal on it, and while it is tying up a good bit of my capital, it has lowered my monthly burn rate significantly.

  • Improve my knowledge of web software and deployment. This was a resounding success. I rolled out several side projects this year, each of which taught me many things. Web servers, datastores, security, queueing, infrastructure automation tools, and more.

  • Take on a social good project. I worked with my friends over at Maryland Nonprofits to help create a spacefinder for nonprofits, focused on low-cost sublets. This tool promises to help nonprofits in the Maryland area find homes for themselves so they can focus on their actual missions. This isn't quite finished yet, but it is nearing release, and I am excited to see where this goes.

  • Climbing. After my stint lifting (and brief forays into Olympic lifting and Crossfit Football), I decided to get back into climbing after all. My original goal was to boulder V6 outdoors, and while I haven't quite crushed it yet, it is on the near horizon. The last time I went out before the end of the year, I climbed three V5 boulder problems.

  • Travel. This goal is always on my list. This year, I was lucky enough to have time to take an 18-day road trip with one of my closest friends. From Virgina, we drove north to Chicago and beyond, ultimately taking highway 2 most of the way across the northern part of the country. Along the way, I saw and met some excellent people, I got to do the greatest hike I've ever done, I saw tons of wildlife, I got to see my sister, and I got to see the City Museum in St. Louis, which was the sleeper hit for the trip as far as I'm concerned. While 18 days isn't as much as I would like, all in all it was still an excellent trip.

  • Create some cool side projects. Like traveling, this is a "forever" goal. This year I released my first "major" side project, Silvi, aimed at improving institutional (and personal) documentation. I also toyed with YellowCap after talking to my mother, a landscape professional, about one of the problems she has in her business: keeping clients up to date in the face of changing situations (backordered plants, weather, etc.). Lately, I've been working on Photobooth Creator, a spin-off of an afternoon hacking project to put together an HTML5 photobooth for the MiserWare holiday party. Additionally, I've done myriad other smallish projects, ranging from games to libraries. You can find most of them on my Github page.

    Along the way, I've grown quite a bit as a developer. Deployment methodologies, integrations with other systems, new languages, and improving old ones have all made my fu much tighter.

New goals for the new year

Based on the amount of flux in my life at the moment, 2014 promises to be an exciting year. Here are, as of now, the goals I have for the upcoming year.

  • Make $500 on a personal project. Word on the street is that the first $500 is the hardest.

  • Get Lasik. Thanks to an incredibly generous gift from my parents, I will be getting my eyes did on January 28th. I am excite!

  • Work on a project with Chris Poirel. Chris is an old friend, and a genius to boot. I don't know if he'll have time with his new job, but I'd love to work on something with him this year.

  • Read 25 challenging books. Both nonfiction and fiction, and I expect to read several less challenging books as well. Along the way I'd like to read A New Kind Of Science. Stephen Wolfram fascinates.

  • Boulder V6 outdoors. Carry-over from last year. The psych is high though, so should be an early one to knock out.

  • Write and record five songs. I've tried this one before, and I have trouble sitting down and actually doing it. We'll see.

  • Learn to fish. I feel like this is almost a birthright.

  • Kill, clean, and eat an animal. As a meat eater, I feel like if I can't do this then I don't deserve to eat animal flesh.

  • Become conversation in Spanish. Just started Rosetta Stone. This is something I've wanted to do for some time.

  • Build a major(ish) project in a functional language. Functional languages seem awesome to me, and I use functional features of many of my favorite languages, but I've never built anything serious in a pure functional language. UNTIL NOW.

  • Travel. I've already got a trip lined up to India to speak at the NAE IAFOE symposium in May. I'd also like to take a big destination climbing trip. Again, a "forever" goal.

  • Create some cool side projects. I'm foreseeing a genetic programming framework for Clojure (with the comments in Spanish!). I usually just follow my interests for side projects, so we'll see.

The Real Value of Software

Posted on 01 December 2013 by Joseph

A minimalist's view

I am undeniably a software fanboy. I work in the industry, I have aspirations to entrepreneurship, and software is my favorite hobby. I like helping people learn how to create and manipulate software. Creating something, something powerful and lasting, where nothing was before and using nothing but your own wits is and will remain one of the most rewarding and challenging aspects of my life. Recently though, I've come to realize that there is a deeper promise of software, one that offers a compound benefit to all of us. Software serves to staunch slightly the wound that threatens all of our well-being and the well-being of the planet on which we live: rampant consumerism.

[Sidebar: I say staunch and not repair because software doesn't really solve anything at a fundamental level. To escape from the 'more is better' cycle, we need to shift our perceptions about what makes us happy and what is really valuable, and this will require participation from all levels. Ourselves as individuals, our friends and family, our media and our ostensibly "society", up to the level of policymakers and economists, everyone will need to rethink priorities for a cure instead of a stopgap.]

What do I mean? Here are a couple of examples:

becomes

becomes

becomes

...and numerous other examples. Somehow, under the guise of lower prices, software and the Internet have convinced millions of people to get rid of vast swaths of their things, reducing manufacturing output, waste, and footprint in one fell swoop!

Space

"So I threw out all my old Backstreet Boys CDs when I got my iPod, so what?" It's true, it may seem like a somewhat trivial example. However, aside from the ongoing benefit (you haven't bought many CDs since then either, have you?) this reduction, and any reduction in the literal footprint of the things we purchase may translate into a reduction in the space we feel we need to live. Smaller apartments and smaller houses in turn translate into a reduced environmental impact, as energy requirements and sprawl are reduced.

Furthermore, though the death of the local shop at the hands of the Internet is generally considered to be a bad thing, one happy side effect is that fewer shops are being built. Less development means less sprawl, less construction waste, and less energy to keep those buildings lit and heated. Though it's hard to say for sure, odds are favorable for a net-positive reduction in energy overall moving from brick-and-mortar shops to online venues.

Waste and pollution

Like the movement away from brick-and-mortar shops, the slow death of the mail has been lamented by many. Ignoring the socioeconomic benefits of mail delivered everywhere, it is hard to argue that the amount of waste paper generated versus email was a good thing. Similarly, the environmental costs of moving mail from place to place won't be missed.

More generally, software has allowed us to eliminate many forms of waste and pollution, both obvious and subtle. A giant pile of discarded junk mail is one thing, but we're also getting rid of the over-packaged media goods we purchase. Though we're really just touching the tip of the iceburg thus far, telecommuting is cutting down on emissions from our vehicles getting us from home to work and back everyday. Built-to-be-consumed items like calendars are not only cheaper but better when they are digital.

Attitude

As mentioned above, a reduction in space and waste isn't solving the problem of consumerism. To really address the issue, we need a change in attitudes. Though I don't have any proof for this, I personally think that eliminating our common "collections" - DVDs, CDs, books, and the like - we are retraining ourselves to stop collecting. The mentality that a bigger collection (of anything) is better, that more is better, is the root of the problem of consumerism, and a source of much pain and frustration, not to mention waste and pollution.

I also think this elimination of visibility will continue. Smart phones and their capability for software have let us consolidate our telephone, Gameboy, iPod, GPS, camera, and alarm clock, and are working on our Kindle and television. The removal of brick-and-mortar stores will cut down on window shopping and impulse purchases. [How we will fare versus truly targeted advertising and marketing that follows us everywhere is another story, and perhaps a worse one in the end.]

Perhaps our collections just shift. Instead of DVDs, we collect apps; instead of electronics we collect followers. If that's the case, then we'll just be trading one kind of consumerism for another. Ultimately it's better for the environment either way. I hope, though, that software will deliver on its promise of a simpler life less encumbered by the burden of a desire for more at any cost.

Startups and Angel Hiring

Posted on 01 June 2013 by Joseph

A close friend of mine, Chris Poirel is graduating with his PhD soon. Unlike many new PhDs, though, he isn't interested in pursuing a career in research or academia. Over the past couple of months and quite a few cups of coffee, I have attempted to give him some guidance in re-inventing himself and his resume to make him more targeted for the type of position he really wants: a data scientist.

His initial applications were for jobs at larger companies, and often companies with a history of hiring for research in industry. His applications were well received, but after a round or two of seemingly successful interviews the companies were passing, often without much of an indication of why. My suggestion was that many of these companies, with their large HR department, were reticent to hire a fresh graduate into a senior position, regardless of their academic pedigree.

The reasoning for their decision is simple: it's a matter of risk. My suggestion was to look into jobs with startups because startups, like angel investors, are in a position to take a risk for someone unproven who might be incredible. Because they don't have much to lose and potentially quite a lot to gain, startups are almost uniquely able to take the leap on the unproven but brilliant PhD, or the 18-year-old woman with the incredible Github account, or the reclusive genius who insists on working from his cabin in Montana. While they might not always work out, taking these "angel hiring" risks potentially offer startups the elusive large multiple.

What does that mean for you? If you run a startup, be willing take risks in hiring (but be prepared to fail fast!). If you're looking for a job, and particularly if you're unproven, consider looking at startups. Of course, as a startup employee you are taking a bit of a risk too, though, again, it's worth it. As for Chris, he just found his data scientist job at RedOwl Analytics, where he'll no doubt be building some seriously next-level software.

The Perils of Embedding Python 2.7

Posted on 01 April 2013 by Joseph

TL;DR: A change to the ‘import site’ mechanism between Python 2.6 and 2.7 can mean silent application exit for applications with embedded Python.

As you may know from some of my other posts, we at MiserWare leverage an embedded Python interpreter in our Granola product, with success despite the pitfalls and sometimes cryptic (or missing) documentation. This week, I upgraded us from Python 2.6.4 to Python 2.7.2. Everything was going smoothly, until I began testing installation packages for software with an embedded interpreter on our clean (i.e. non-development environment) test systems.

Since the packaging, in this case MSI files, hadn’t changed significantly for the upcoming release, and since my tests on my development machine of the software itself had gone smoothly, I expected the installation tests to be what they usually are: tedious, boring, and successful. I fired up the installer, went through the brief UI sequence, hit Finish and… the software didn’t start. Hmm. I cleaned the system completely, re-installed, same problem. I locate the file on disk, double click, same problem. I run the program from a command prompt, same problem.

At this point, I figure that the problem is with the packaging itself, so I double check my WiX files, but everything seems to be fine. By this point, it still hadn’t occurred to me that the Python upgrade could be the problem, so I drop in a few debugging MessageBox calls, rebuild, and re-install. After a couple rounds of that, I discover that the software is failing inside the Py_Initialize call. Hmm.

I fire up an old development environment that hadn’t upgraded to Python 2.7 yet and load the project in the Visual Studio debugger. Running the program causes program exit with return value 1. What? All of our return value error codes are negative numbers. Was the embedded Python library causing the application itself to exit?

It turns out, that is exactly what was happening. After some step-debugging through the disassembly of python27.dll with the Python source tree open in a separate console, I finally locate the source of the exit in Python/pythonrun.c:

static void
initsite(void)
{
    PyObject *m;
    m = PyImport_ImportModule("site");
    if (m == NULL) {
        PyErr_Print();
        Py_Finalize();
        exit(1);
    }
    else {
        Py_DECREF(m);
    }
}

Yikes! Previously (at least, in 2.6.4), ‘import site‘ failure would at worst print an error message to the console if there was an attached console… in the case of Granola, a Windows GUI application, there wasn’t, so all I had to work with was an application exit code being raised from within a linked library. If I was going to be diplomatic, I’d say that the decision to accept that patch was made with the interpreter executable and not embedding applications in mind. And it gets better.

Now armed with the location of the failure, it’s time to fix the application. It turns out that the call to initsite() occurs prior to the parsing of the environment variables. What that means is that PYTHONPATH, PYTHONHOME, and other ways to tell the interpreter where to find modules don’t have an impact on the search for the site module, though that is not documented. [N.B., the reason it worked on my development machine was that it DOES honor a Windows registry setting that the Python installer creates, pointing to its own lib path.]

Without detailing the pain I went through to determine this, I’ll tell you the answer. You basically have one option (in Windows at least): you need to lay out your Python modules relative to your embedding application just as they appear in the normal Python installation tree, which is to say putting them all in Lib/ and DLLs/ folders at the same directory level as your application. You can also optionally call Py_SetPythonHome to specify a different directory under which to search for Lib/ and DLLs/. Oh, and just in case you go looking for it, that layout isn’t documented; you’ll only see the preferred layout for Unix systems which won’t work in Windows.

What’s the takeaway? For me, it just means one thing: don’t expect consistency out of future versions of Python, at least with regard to embedding applications.


Copyright © 2016 Joseph Turner