Page 1 of 1 [ 5 posts ] 

unknownfactor
Raven
Raven

User avatar

Joined: 8 Apr 2013
Gender: Male
Posts: 107

14 Sep 2014, 8:49 pm

I waste time sometimes when I code. Nothing I'm proud of. Sometimes, I catch myself thinking in circles about some problem or get otherwise distracted. There are these little challenges of trying to make things overly functional in situations where simpler imperative logic is called for. Then there are these neat little metaprogramming bits that only framework makers need care about. It could even be something in an API that catches my eye.

So to the programmers out there.... What are some ways that one can avoid becoming "tangentially distracted" when writing code?



slave
Veteran
Veteran

User avatar

Joined: 28 Feb 2012
Age: 111
Gender: Male
Posts: 4,420
Location: Dystopia Planetia

14 Sep 2014, 9:03 pm

i do not code.

i can related to what u describe though not in the same task.

Do u have ADD or ADHD?



RTFM
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 6 Sep 2014
Gender: Male
Posts: 33

15 Sep 2014, 5:23 am

I get distracted but it is best described as thought paralysis.

I spend a lot of time thinking about the data structures and modularity of the code. Then, as I normally program in C, it gets to a point of complexity and I consider if I actually 'should' be doing this in C or if Perl would do the job better.

I can only avoid distraction by coding in my head first, before putting my fingers on the keys



unknownfactor
Raven
Raven

User avatar

Joined: 8 Apr 2013
Gender: Male
Posts: 107

15 Sep 2014, 1:00 pm

Slave:
Yes, I do have ADD and am treated for it. Perhaps we do have the same issue. There's something about subtle optimizations of the task on hand. It can happen in a lot of writing or creative endeavors. It tends to make endeavors stall.

Writers cope with the issue by giving themselves permission to do a "crappy first draft". It might be applicable to coders too. I'll have to dry that some time.

RTFM
You're coding in your head gets me thinking about a small variation to that tactic. Personally, for me, it would be with whiteboard and paper. It's the same principle I think. Sometimes, the wise move is to stay away from the keyboard.

So that gives me two tactics to try. Thanks!



eric76
Veteran
Veteran

User avatar

Joined: 31 Aug 2012
Gender: Male
Posts: 10,660
Location: In the heart of the dust bowl

15 Sep 2014, 1:58 pm

I often try to generalize the problem to produce code that could be used for a wide variety of different purposes. In many cases, I never need to reuse the code elsewhere.