Also, https://mynoise.net/ has worked wonders for me.
In both cases, it seems that unstructured audio input, like, occupies the parts of my mind that would otherwise distract me.
Same. Lounge, Ambient, Chillout, Chillstep (https://di.fm has a bunch of great streams. SoundCloud and MixCloud have complete replayable sets, too.)
I've heard that videogame soundtracks are designed to not be distracting; to help focus.
My personal favourite for working (or unwinding or cooking or cutting your toenails), though rhythmic & structured electronica, would be Jan Jelinek's Loop Finding Jazz Records: https://www.youtube.com/watch?v=6hIgBEXuQD8
It's playing mostly chillstep and slow electronic music with decent or no vocals.
If you've already implemented a method in pseudocode, you can use StackOverflow/documentation/Google/etc to look up the actual API calls once you're translating the program into code.
And while writing pseudocode how do you know the level of depth and detail to include.
While not pseudocode per se - my offline coding is predominantly outlining structures and data flows; so how I would structure the application (classes etc - where what code would reside etc). Then I expand from the structure to start moving the data objects themselves around (also giving an overarching structure to the data objects as well), where the flow / control logic starts coming again. Sometimes I'll write a few transformers / mappers there as well if they're needed when sending / fetching data from a few places.
Usually you can speed this up greatly by following the conventions of a framework; for webapps I would design the models/controllers/routes/views, mobile apps would be navigation tree, views (screens), components, and if there's a lot of data, then mappers/reducers etc. So it's usually small descriptions (even one or two words) of what a given class/object/action is doing, where it's coming from and where it's going. I can then expand this to be very specific with fields, routes etc, and what they're all doing.
Having that basic, overall structure done offline means I can approach the coding with purely an implementation mindset and don't have to worry about the "big picture" when doing all the small bits - when you start coding immediately you're on a bit of a discovery path with the big picture, and the implementation details, and changing stuff on the fly etc, which can be rather time consuming / side track into different places and so forth.
Most of what I do is just take data from one place, change it somehow, and present it somewhere else - so it makes the above fairly easy and effective for my work.
As to your question of depth, I start at the highest level if abstraction I can get away with, assume that some magic function exists and does what you need. If said function isn't in the standard library, implement it if it's simple, implement it, just know that you're getting closer to actual code the more of these functions you flesh out, and some of them are likely to be libraries, you'll want to look up later.
The crazy thing is how many times you’ll try to go to one of your addicting sites even though it’s blocked. SelfControl acts as a great circuit breaker in this case, and can also show how bad the addiction is.
If I want to read HN, I have to do it on my phone. If I’m looking at my phone, I know I’m screwing around, so it doesn’t last long.
For others, yes, some people you have to remind to eat :)
I've always had a reputation for delivering late but this has gotten better over time as I learn to account for unknowns and my definition of "last minute" has gotten more realistic.
Over the years I have tried fruitlessly to make myself more proactive and have consistently failed. I do my best work under pressure and am now focused on embracing who I am and finding a way to make that successful instead of trying to change it. There is a name for this - the Eisenhower method - but it's not a strategy I do deliberately, it's just naturally who I am.
So how do I focus? When there's no time to waste it just comes naturally. I take mini-breaks too, but then my subconscious very quickly kicks me back into gear.
Discipline only goes so far. This doesn't happen if your motivation is high enough as you'd just lock back into the project once you've regenerated.
Treat motivation as a supplement. You might be looking at HN as your mind craves more motivation.
Think of people, not cash rewards. Who will this project help? Users? Stakeholders? If you have to think of cash, think of how you could spend it on making other people happier... donations to the poor, buying mom a gift, taking your child to a theme park.
You might also be motivated by creative impulses. Bookmark projects you admire. It can be roadmaps and devlogs. Open them up again when you're feeling demotivated or need a break.
paper: https://arxiv.org/abs/1610.04255
"how it works" (with citations): https://www.focusatwill.com/app/pages/science-of-focus-conce...
Its not 100% effective since I can still use my phone, but it helps. Unfortunately I haven't found a good Mac alternative that allows you to update your filter list in bulk.
I've discovered that I also periodically want to check HN, imgur, etc periodically.
Fundamentally, this is because I really (really...) need to setup an intelligent social tracking system that tells me about interesting things that I will probably want to intervene in RIGHT NOW, whether inconvenient or not, because of some ascribed value (for example being able to comment on a relevant discussion, reach out to someone in the context of some opportunity, etc). I primarily check in on HN for this reason; "is there relevant discussion happening right now." While I don't have the system I just described, I'm trying to be it myself.
Of course this doesn't really scale or work, but it's incredibly fun to pretend I'm competently keeping up with everything because the activity of "just making sure" is one of those simple, predictable activities that has statistically low chance of disappointment (or concrete negativity/malice) and statistically high chance of low-effort reward (except for those 183 times where it was boring, which I ignore those because superstition is powerful), and... oh hey, there goes my day.
When I realized this recently I was able to at least stare the problem in the face. Now I can work on swinging in the direction of closure for this whole... thing of "keeping up" that I've deliberately been cultivating lack of closure of, for the sake of addiction, and hopefully get myself focused and back on track.
I guess the "one level up" scope/domain from this would be "online distraction", rather than focusing in general. I said a few related things on the subject a couple months ago: https://news.ycombinator.com/item?id=15418671#15423170
And I commented on the value of supplements in this thread over here: https://news.ycombinator.com/item?id=15904764
"brew install sbagen"
"sbagen /usr/local/share/sbagen/examples/focus/focus-03-a.sbg"
(Linux packages exist too.)
Don't expect anything huge, but the effect that I see with simple binaural beats is a slight calming and improved focus. It seems to quiet the urge to goof off and compulsively check sites like this. No it's not on right now.
Someone posted this quote a while back, and it stuck with me. "Think of your mind every morning as a clean desk, and every time you get distracted via social, game, etc, you put something on it. It then gets progressively harder to do work with a messier desk. The best way is to just always have a clean desk."
I logged habits and supplements for over a year. Things that were effective were having a lot of strong routines that pull you in the right direction.
So things that helped were
X) Have some type of metric you are measuring to. For me it was RescueTime and WakaTime. How productive was I for this week compared to last?
1A) Have your phone on DnD or Airplane Mode.
1) Start the day off with SelfControl app. Add the timer to lock out all disractions until X PM every day.
2) Use a cold shower to wake up
3) Meditate
4) Eat the same foods that won't make you groggy / crap. This sounds masochastic in some way, but it's much easier than it sounds once you get used to it. For instance, the same oatmeal for breakfast is a great way to set a routine.
5) Track what supplements and food you were taking that improved productivity.
6) Inversely, see what supplements or diets you might be taking that does the opposite.
7) Set up a sleep routine. Melatonin at 3mg is a sweet spot. Getting six hours of sleep every night is the perfect amount for me. Everyone varies. The point is don't take "one size fits all advice" for something so crucial to your life. Less than 5 and I was easily distracted. More than 7 and I was groggy. There's a lot of information about how to sleep better. The point is to find a way to maximize sleep quality ... six hours in a city is going to be very different from six hours of sleep in a quiet area.
8) I've tried a lot of supplements. The most effective ones on productivity were ones that helped me with anxiety (so the opposite of caffeine). I eliminated a lot that didn't do anything.
9) Have a track / music that you listen to that starts you in a groove. For instance, I have a EDM Mixtape that I've probably listened to over a thousand times this year. You'll find that a lot of high throughout writers do something similar. The music helps build a habit of "okay, it's time to do work now"
10) Find the right setting / environment that makes you productive. Face a wall. Accept the fact if you can't work from home, then don't.
11) Go for walks when you're bored. Admit to yourself when you're not being productive and you're just spinning your wheels.
12) Exercise. Missing gym workouts (even though it was like 1-2 hours) was a sharp drop in total productivity.
13) Pomodoros. Start with 25 minutes and keep on going up (I average hour long Pomodoros now). When you get distracted in a Pomodoro, have a note card called "Distractions" and write what you want to to do there. That way your mind can stop obsessing about "New Avengers Trailer" if it knows it's going to get there after the break.
When you first start with Pomodoros, have a notebook of how many Pomodoros you did. Make it a goal to do just five pomodoros a day. You'll be impressed how hard that is initially.
14) No lying to yourself. Everytime I've said "this time is different for a YouTube video about anything mildy interesting", I've regretted it.
15) Plan for a social night at least once a week. You do need some rest. Self flagellation about not having earned it is almost a recipe of more anxiety and procrastination. (I'm not great at following this yet)
16) Have a deadline to finish something.
To give some backdrop, this has made me really productive throughout the last year without burning out. I've worked 60+ hours before at startups and just BURNED out, whereas now I can definitely push that easily without hitting that same wall. I integrated all these habits one by one when I was certain through quantitive evidence it was working.
Can't say much about helping social life though. This definitely takes a hit when you try to maximize productivity and flow at the expense of social life.
First off, I think there's a myth about productivity. That you are only productive when you are writing code. That's not true.
The way I work is that I need to have a fully formed idea of the solution to a problem before I start writing code. That doesn't mean it's the correct solution. But I have to start with an idea of how I'm going to solve the problem.
Sometimes that takes 10 seconds, if it's a new feature. Sometimes it takes 10 days if it's a bug I don't understand. Sometimes it's 10 hours for a totally new project. Could be anything. But I always start with documenting things in my way: offline. Your notebook and a good pen are your friends.
I do my best thinking at this state away from the computer and away from code. I do it best walking around. Once I think I know how to solve the problem (usually wrong for larger projects and bugs; usually right for new features in an existing project), write down what you intend to do on paper. I know Project Management tools exist for this task, but they don't have the same connection for me as physically writing something down.
As I'm doing that writing, I'll realize a lot of things that are bad about this approach and correct myself. And then my brain will start to organize tasks and group them. While I'm going through this exercise, I will set checkpoints for myself. If it's a ticket for a bug that needs to get fixed today, well, maybe I'll get lucky, and it's one and done. Other times, not so much.
I also try to organize my work segments vs. my thinking segments around my meeting schedules. Because even when my day is broken up by meetings, I'm still probably thinking about my problem.
Building in your checkpoints by planning your work this way has been very helpful for me, not because I need to check facebook or twitter or HN, but because it represents tangible progress.
But if you actually look at my workflow, it's a constant iteration of think a lot, followed by pounding out some code for a few minutes. Sometimes that ratio is very small on the code side, and sometimes it's quite large on the code side.
Without making comments as some other people have about medical or mental problems, I would suggest this: that there's a lot to be gained from working in very small chunks and that if you're worried about momentum, perhaps that's the problem you should be trying to address. Momentum is a tremendously overloaded word, and you shouldn't be trying to evaluate yourself based on your ability to obtain or maintain it.
I have a fairly similar pattern to what you are talking about. Solve a thing; then think about the next thing; then solve that. No one has ever complained about my productivity. On the contrary, people sometimes wonder how I can get so much done when I spend so little time "working."
Different people work in different ways, and I don't think that's a thing to worry about. I've really never very much experienced what people call the zone in programming. I certainly do as a musician when I'm practicing my violin. My girlfriend hates when I practice violin because I absolutely cannot be taken out of that mental space.
As a developer, I don't care about the context switch or the momentum or focus. I can go back and forth. No big deal. So I can understand why this can be problematic. But it might not be.
Questions to ask: are you being told that you aren't productive enough? Are you feeling like you aren't doing good enough work? Or enough good work? Where is this criticism coming from? Is it external or internal? Why do you want to change your patterns?
One of the things that technology companies need to realize is that there are more ways to be productive than just by being in your chair.
I'm my most productive when I'm not writing code. I'm my most productive when I'm solving the problem. And then the code is just a translation of what I've figured out.
When I follow this path, I find that my thoughts are more often wrong than right, and I don't have to worry about getting up and thinking or rewarding until I've fixed my thinking about the problem and proven it to myself through code and tests. And when I get into that mindset, I can't stop until I've corrected myself and crossed everything off the list in my notebook.
Take that for what's it's worth. I'm just one person. And I could be wrong about all of this. But I think I understand a little of what you're talking about, and this is how I deal with it.
"Brain dumps" - the act of transferring mental information to another medium can itself be a great mental relief. eg.:
- drawing diagrams w/ pencil and paper. things are more complicated than we first imagine them, often... remember, "the right perspective is worth 80 IQ points" - alan kay
- debugging by talking to yourself out loud
- post-it note reminders everywhere -> your short-term/working memory doesn't feel cramped
It is possible, maybe, that you are a bit concerned about enjoying programming/working to the fullest extent.. because you expected it to be more enjoyable. All that said... good focus is not just maximum momentum -- what you are really asking about, imo, sounds like a question of laminar vs turbulent flow :) To go "down the rabbit hole" with great momentum, versus a fragmented mind pulled apart in every direction with equal momentum :P Well, we all know how time flies when you're having fun, or enjoying good company, right? Yet it almost seems you are asking for tips on how to make time fly when it shouldn't, hypothetically kinda like this:
>"if -- while I am working on something difficult -- I had the capacity to just make time fly quicker, then I'd have no problems with stamina or keeping focused, by design. Furthermore, it would be a momentary-enough challenge to /become fun/. So how do I hasten the passage of time when work is hard?"
The answer to this is: unimpeded flow = mastery. Extrinsic obstacles are easy to spot but one's intrinsic obstacles take much longer to become aware of..
Only after intuition replaces the tendency to hesitant deliberation will deliberate action come easily. As you gain experience, you subvocalize less and operate 'fluidly' at the right mental level of semantics.. With mastery comes the use of "the voice as an object that can be seen as the lever of thought" [0]. Just think of the last time you were amazed by a display of talent or performance by someone that left you so amazed you wished for a few minutes more of their time.
imo, to solve your problems, you have a few options:
- you could improve to the point that coding gains a new and desiring appeal.
- you could find something (or somebody) with exceptionally inspiring talents to code with
- or, you could look deeper into yourself, and see if the focuslessness is really just a desirelessness