
The Interruptible Programmer (2010) - chrisbuc
https://www.stevestreeting.com/2010/09/04/work-2-0/
======
Animats
_" Maintain context outside of your head at all times"_

Yes. I currently keep a text document, "NOTES.md", open for whatever project
I'm working on. This isn't a bug list; it's just things that I'll need to come
back to and deal with. If there's something that has to be dealt with, and
it's not in comments in the code, it goes here. This is in the code directory
and is checked in with Git, but it's just for my own use.

Some excerpts for a large C++ program:

    
    
        Added logging to viewer. Turn off FSEnableLogThrottle debug switch
        when in use to catch all log messages.
    
        Logged a short road trip and a short boat trip. Huge Z velocity noise on road, low noise on water.
    
        2020-03-24
    
        Trying various forms of filtering. Current approach:
        - Low-pass filter linear velocity and angular velocity. 
        - Difference with instantaneous velocity and angular velocity
        - Get magnitudes of differences.
        - Time limit for each is allowed error / magnitude of difference
        - Use lowest time limit to limit extrapolation time
        Simple analysis of the data indicates this might work
    
        Problems:
        - Filtering data with varying time deltas needs work. 
          Test uses the assumption that updates come in at a rougly uniform rate.
        - Need to convert linear velocity to object coords before filtering so smooth turns work.
    
        2020-03-31
    
        Adding files to Firestorm:
    
        Add .cpp and .h files to appropriate sections of
            indra/newview/CMakeLists.txt
      
        New files go in 
            indra/newview
      
        Then ?
            Run autobuild again?
        
        Script
            sh installnewfiles.sh
            copies the new files to the newview directory.
            Our version is maintained with git in the firestorm-mods repository
        
         2020-04-02
     
         Extrapolator is running. Results not too good:
     
         - Seems to be be overrunning extrapolation limit. Not sure.
         - Extrapolation limit is calculated before the last object updates have arrived.
           So last-second changes in the velocity are not caught.
    
         - Working. Good tuning values are filter, 10 secs, 
           angle err, 20 degrees, position error, 0.25m.

~~~
Kinrany
A similar interesting approach is to write notes in Git commit messages. The
author of the Spiral language does it: [https://github.com/mrakgr/The-Spiral-
Language/commits/master](https://github.com/mrakgr/The-Spiral-
Language/commits/master)

~~~
letientai299
I hope that he won't write commit message like that for project that involve
many people. Such log is no helpful (for anyone but him, I guess).

~~~
jsight
IMO, these are still useful, but should be rebased away before a PR in a large
project.

------
axguscbklp
>I think the style in which I practiced my craft for the first 15 years of my
career was much the same as every other enthusiastic developer: you put a ton
of hours in. 12-16+ hour days, evening and weekend coding marathons, pizza in
the keyboard, crunch times, 3am debugging sessions where you just can’t go to
bed because you can feel the source of that bug just beyond your fingertips,
dammit, desperate last-minute sprints to deadlines where you manage to slot
that last piece in, Jack Bauer-like, just before the world goes to hell.

Uhh... does anyone other than maybe 1 in 100 developers actually do this? I
think that many more than 1 in 100 developers are enthusiastic... but I doubt,
whether they are enthusiastic or not, that significantly more than 1 in 100
developers or so act like the above. If I'm going to work 12-16+ hour days,
I'd better either be in love with the company or have a good reason to expect
that I could cash out and be rich as fuck at some point.

~~~
pjc50
Some people do do this ... for the first few years, until they burn out or
decide they want a relationship.

The most productive person I've ever met wrote an H265 decoder by himself in
three months of working four-day weeks so he could spend time with his family.

~~~
globular-toast
> Some people do do this ... for the first few years, until they burn out or
> decide they want a relationship.

I still do it. I'm 34 and currently with my second live-in girlfriend. The
first one didn't leave me due to programming; I just decided to go for a
younger model. I'm not trying to brag but rather dispel the myth that you need
to stop programming to have a relationship. My girlfriends have always known
what is important in _my_ life: me, my computer, my car, my bicycles, then
them. Instead of relying on being the most important thing in _my_ life, I
encourage them to the be the most important thing in their own lives. It's a
far healthier relationship and part of a Stoic lifestyle which I find to be
the true path to happiness.

~~~
scollet
Is this a real comment?

~~~
globular-toast
It's real in the sense that it's honest, yes. Do you doubt that? I see it's
downvoted despite containing no offensive language and merely being an honest
account of my life. I wonder why that is. At least I can say I'm not just
spouting stuff that makes the echo chamber happy. I love programming and I
love machines. Designing and building them gives me a purpose in life. I also
have a primitive desire to mate. Does any of that offend you?

~~~
mlthoughts2018
It expresses at least one idea that people find morally reprehensible. It
being honest is not a redeeming quality.

Additionally, looking through your comment history, I feel your comments are
really written by a human, but they do have a very eerie similarity to
comments written by GPT2 bots.

~~~
globular-toast
What part is morally reprehensible?

It's fascinating that you doubt whether people like me could actually exist.

~~~
mlthoughts2018
I did not say your comment _is_ morally reprehensible, only that it’s widely
and commonly believed to be morally reprehensible by many people. I decline to
state my personal normative view about it.

That part is when you refer to having a new relationship partner as getting “a
younger model.”

I do not have any trouble believing you exist and I believe people like you
are reasonably widespread.

I only meant to indicate the cadence and style of your written comments has a
great degree of similarity with the text generated by GPT2 bots.

~~~
globular-toast
It's fascinating but also quite scary that you would probably believe me if I
told you I was a bot. It seems that those bots are so good now that if you
read some human output with the idea that it might be a bot (because e.g.
someone asked if it's "real") that you can't actually tell. That provides a
whole new way for echo chambers to extinguish dissenting views.

~~~
mlthoughts2018
I agree with your comment for sure. But I also think it’s interesting that
your natural style of communication is so readily emulated by bots. I don’t
think it’s true of all people generally. Some people are just more bot-like in
their internal processes I think.

~~~
globular-toast
I'm pretty autistic. In a way I am a bot who has learned to be more "human" to
get what I want in life. Naturally I'm a complete recluse, but I found that
didn't make me happy.

------
marcus_holmes
The "power of breaks" really resonated. I, too, have learned that sitting at
the computer is often the worst way of solving a coding problem.

I go for walks, or a run if I'm in the mood. No music. Just my brain and fresh
air. It's about 95% certain that I'll come up with a solution to the problem
while walking. Often I have to turn around and head straight back to the desk
to start working on the solution. But I try to resist this, as I often come up
with clarifications to the solution if I continue walking.

It's like my brain doesn't work properly unless my legs are moving.

------
nkingsy
Day to day work at at $largetechco requires such an enormous amount of context
that even a simple task can cause my working memory to overflow, triggering my
“this must be fixed, too complex” instinct, and paralyzing my ability to work
for long stretches of time.

I find that I have to make a practice of ignoring my refactor instincts,
because there usually just isn’t anything I can do.

Externalized context definitely helps, but 1 year in, I’m finding my brain has
not adapted to this reality.

I use playgrounds and design documents to do most of my thinking because I
simply cannot reason about the real application without my head exploding.

This has improved my thinking tremendously, as I was never someone capable of
outlining thoughts before coding them. I still can’t do that, but when I
encounter a challenge, I can draw up the simplest possible version of it in a
playground, write a document about it, discuss with stakeholders, formulate a
plan, then return to the real code where I can put my full focus on managing
the background complexity, having already worked out the feature complexity
elsewhere.

------
RangerScience
All of this is a huge part of the reason I love TDD. It's a checklist, and
I've always got my next item, and my working state is by and large _in the
code_. I can even code while VERY distracted (meetings, cough cough) and
succeed (albeit slowly). It can help with the tangential issues; maybe I whip
out a (failing) test, or maybe I just mantra "only fix this one test".

~~~
taneq
These are all great points in favour of TDD. They're a ratchet on your code
that lets you crank it out in small increments without losing much progress.

I feel like this only helps with distractions and interruptions, though, if
you're doing routine work that you already fully understand and can code 'off
the top of your head'. Admittedly this is the entirety of many software jobs
and the bulk of even the most challenging, but there's still sometimes a need
for time to think unimpeded.

~~~
RangerScience
More or less the case here; wrote this project, now refactoring and adding
tests. Not every part of it could be done while 'distracted'.

Good testing still helps with distractions because good testing enforces a
code style that's very bite-sized; so if your 'tasks' are 20-40m, you can fit
a lot of distractions. Also, each task (generally) by virtue of being so small
takes up less mental RAM, so you don't have to page out as much when a
distraction happens.

Also makes it easy to work "around" the hard part, and come back to it when
you know you'll have that uninterrupted time. Or late that night when
inspiration strikes and now it's easy :)

~~~
thesz
I wonder, what kind of problem domain would allow such small and local
programming?

~~~
RangerScience
Chat bot. brian.bot

The hard / complex part is (first) parsing parts of a Slack conversation to
the do the AI part, and (second) the Slack interactive messages, which get
weird when you try to use them as a form.

 _a lot_ of just "if these messages happen in this order, this correct thing
still happens", where the difference between different message types is, well,
not minimal, but simple and straightforward.

This has definitely led to waaay to much copy pasta, but it's well
encapsulated within the test fixtures.

------
julius_set
I have the opposite problem I can sit and focus for hours and hours this
causes me health issues as sometimes I forget to take care of myself

~~~
7thaccount
I know you're serious, but if taken in good humor, this almost sounds like
Dilbert's response to the interview question of what do you do badly. He gets
nervous and says something like "I work so hard that I forget human hygeine
and start to rot in my cube" or something along those lines. I've been up
against some rough deadlines where that comic really came to mind :).

~~~
teddyh
Here is the strip in question:

[https://dilbert.com/strip/1995-04-16](https://dilbert.com/strip/1995-04-16)

~~~
Izkata
Wow, Dilbert really slimmed down since then. I guess it wasn't an interview
lie, only exaggeration.

------
chrisbuc
With "Stop trying to make hard work easy" [1] on the HN front page, it
reminded me of this that I refer people back to regularly.

[1]
[https://news.ycombinator.com/item?id=23154519](https://news.ycombinator.com/item?id=23154519)

~~~
partyboat1586
This guy's strongman "I've got news for you" philosophy is productivity porn.
I do like the idea of the focus crown if you've got kids though, that's a good
one.

------
thrower123
Maybe we could just not interrupt programmers.

The current demise of offices has done wonders for engineer productivity.

One of the problems is that it really requires that people think a little
harder and actually write things down, rather than just blundering through
things in real-time.

------
xyzal
Oh my, I empathize a lot with the author. In january, long periods of sitting
brought me a slip of the L5-S1 disc, and now I have to exercise every hour or
so in the office for several minutes to be able to walk home with manageable
amounts of pain at the end of the day.

It takes a surprising amount of willpower to stick to the exercise schedule.
Call of the zone is alluring.

In case anyone here is in a similar situation and has any tips, please share
...

~~~
Jtsummers
I was in an accident that resulted in the same L5-S1 area being injured, and
spent several months recovering. Honestly, the thing that got me back on track
was losing weight (I weighed around 220-230 at the time, and dropped to
180-190 and stayed there for several years). The pain periodically recurred,
but nothing like the initial period. I took up walking, which turned into
running (I played rec soccer, but that was the extent of my exercise prior to
the accident). That may be out of reach depending on the extent of your issues
(or other physical issues), but cycling, swimming, and rowing are great
alternatives. I later took up BJJ, wrestling, and a conditioning course (meant
to help with endurance in those other two). That did a ton to eliminate the
pain. I learned what I couldn't do in BJJ and wrestling because of my back,
but the gym I was at was great (a lot of 30+ participants, and a fair number
over 40 and even 50) so I just partnered with people who understood my issues
and we worked around it.

The main thing for me, with getting into running, was that I did it 3 days a
week and it was in the US south, so I was able to go out almost all year.
There were a couple ponds I'd run by so it was a great way to get out of the
work zone and clear my head. When I started having knee problems I'd take my
bike to the same area and make three laps (15k) a few times a week (low
traffic, only had one near-accident when an asshole passed me while I was
about to make a left turn).

I've moved, the weather was bad, and I didn't have access to a gym (and now I
don't have access to a gym) so the weight started coming back and so did the
back pain. I've got the bike fixed up now and the weather is better, so once I
find some good routes here (I hate riding on roads with lots of traffic) I
hope to shed this weight and get back on track.

------
viburnum
Making little notes (instead of trying to keep it all in my head) has helped
me tremendously. Simply writing stuff down helps clear away the fog.

------
ojnabieoot
Unfortunately the real way to be an "interruptible programmer" is

a) be self-employed, i.e. be your own boss b) have the kind of good work
hygiene

This advice is worthless for 95% of programmers contending with interruptions,
which are urgent (or putatively urgent) things from the people who pay us and
cannot be ignored.

------
thadk
I read this back in the day, added some tool which bugged me every 30 minutes
and remember enjoying it.

Not sure how I didn't carry it forward onto my subsequent computer, but have
definitely pondered re-instituting over the years. Thanks for the re-share of
the original justification!

~~~
teddyh
See also the _Durr_ wristband, which vibrated every _5 minutes_ :

[https://www.wired.com/2014/01/a-vibrating-watch-that-
messes-...](https://www.wired.com/2014/01/a-vibrating-watch-that-messes-with-
your-perception-of-time/)

Discussed here:

[https://news.ycombinator.com/item?id=7007731](https://news.ycombinator.com/item?id=7007731)

------
swah
I have been trying [http://roamresearch.com/](http://roamresearch.com/) (or
Dynalist) to keep a daily log of my findings, projects and (some) tasks.. -
its going quite well.

------
overgard
I honestly don't know if this is because I'm dumb or I'm smart, or maybe the
work context I developed in, but personally interruptions don't really screw
up my flow much. The only time it really causes me to lose focus is if the
interruption has a high emotional reaction.

I don't like interrupting others but at some point I wonder if some just don't
do anything if they're not in "flow". I think it's important to be able to
make progress when you're not in a flow state. Its a skill.

------
kuharich
Prior comments:
[http://news.ycombinator.com/item?id=1790365](http://news.ycombinator.com/item?id=1790365)

------
evanwise
I find that I can tolerate distractions like getting up to get a cup of coffee
or stretch or do a few push-ups without much issue. I am able to maintain
complex state and jump back into the flow. Maybe this is just a young brain
thing and will go way, but in any case, this advice seems to be more tuned to
those sorts of distractions. What happens in an office is entirely different.
Your working memory is finite and social interactions are complex. Moreover,
most people become personally offended (whether they will admit it or not) if
you do not appear to be paying full attention. This was a particularly bad
case but I once had a boss who would become visibly angry if you even stopped
to write some notes when he showed up to interrupt you. Many of these
interruptions are totally irrelevant too. Your boss does not need to stop by 4
times a day to get a detailed progress report. Your chatty coworker does not
need to talk about his weekend at the lake. It's perfectly natural to feel
some annoyance in a situation like this and it seems kind of absurd and
subservient to me to ask devs to bend over backwards to accommodate the
personality flaws of their bosses and coworkers. Sure, you shouldn't let this
annoyance derail you, but that doesn't mean you also shouldn't tell your
chatty coworker to shut up occasionally. Okay, maybe you shouldn't be so rude
about it, but you need to set healthy boundaries and be allowed to block off
time for the work you need to do. If you aren't, you are probably working for
a shitty boss or organization. No amount of distraction management is going to
help you there.

Beyond that, I think that there is a limit to the complexity of problems that
can be tackled without periods of extreme focus. Some problem domains are full
of deep and irreducible complexity. It's probably true that we often mistake
accidental complexity for irreducible complexity or fail to break down
problems, but, and this may come off as arrogant, I find that it is generally
people that have never had to deal with a problem domain with such irreducible
complexities who think that we can solve all of our problems by breaking up
work into smaller chunks. Sometimes you also have to deal with business
requirements that effectively turn accidental complexity into irreducible
complexity. Like, yes, technically things like regulatory compliance are
accidental complexity but we also can't just simplify them away without facing
serious repercussions. It's also much much easier to maintain context and
state in problem domains you have worked in extensively for years, and you
tend to be able to write more concise yet still complete descriptions of
things within that problem domain. I suspect that has something to do with why
the author only adopted this working approach later in life, in addition to
the health problems he mentions. For instance, I find that I can pick up
physics and math problems with minimal friction because I spent the better
part of a decade studying those subjects intensely, but ask me to debug a SQL
script (an area where I have minimal domain knowledge) and I will need
probably 30 minutes before I can even think a useful thought about it. Most
devs do not have the luxury of only working on problems they are domain
experts on. Business requirements and capacity are fluid things.

------
valuearb
Some good thoughts in this.

