News for hackers. Stuff that matters.
Re:How the Pomodoro Technique changed my workday by d0m on Tuesday November 17, 2015 @05:18PM (#10584410)
Personally, what kills my productivity is when it takes more than 5secs to compile/load/whatever. I don't have ADHD in real life, but when I'm hacking, I can't wait that long, so I'll alt-tab and look at HN or whatever for "5-10secs". Problem is I find an interesting article and then come back 5minutes later.

So, I know it's not the best solution, but I keep compiling/loading time REALLY fast. I.e. hot reloading is a good example of small thing that boost productivity insanely. But even in C++, I'd just work on a separate project and stub everything so that it compiles in a few ms. I know that if I need to recompile the whole codebase everytime I'm making a change I won't get any work done.

It's also because I tend to do the code/test really fast. I know some people who code for a few minutes, then test it.. so it's less of a problem for them.

Anyway, back to my hacking.. see, that sucker took more than 5 seconds to run :-)

Re:How the Pomodoro Technique changed my workday by DrScump on Tuesday November 17, 2015 @05:27PM (#10584449)

  what kills my productivity is when it takes more than 5secs to compile/load/whatever.
Sigh. These kids today have no idea what it was like to dial in to work at midnight so you could fire off another build that could finish by morning, if you were lucky. Or, to be limited to off-hours for running builds at all.
Re:How the Pomodoro Technique changed my workday by jernfrost on Tuesday November 17, 2015 @06:17PM (#10584729)
Yeah but you didn't have internet to waste your time back then. I fucking hate internet at times. It has conditioned me to read everything in little digestible tidbits. Before I spent much more time reading actual books, staying concentrated on reading one topic for you know at least 1 hour at a time.
Re:How the Pomodoro Technique changed my workday by DrScump on Wednesday November 18, 2015 @03:33AM (#10586629)
Sure we did. I was very active in several Usenet newsgroups from 1987 on.

Of course, at that time, few companies were connected 24x7. My employer, for example, dialed in for mail and Usenet traffic exchanges a handful of times a day.

The debates over the first ANSI C spec in comp.lang.c were most entertaining.

Re:How the Pomodoro Technique changed my workday by artifaxx on Tuesday November 17, 2015 @05:32PM (#10584479)
The two are not totally incompatible. If you can decouple segments of huge projects, you can mock input and get quick feedback on the specific segment you are developing. Insanely long builds still exist today, I know of and have worked on software that ranges from 1 hr to 1 day to build quite recently...you just have to find ways to avoid that huge cost :p
Re:How the Pomodoro Technique changed my workday by PeterisP on Wednesday November 18, 2015 @04:41AM (#10586823)
You still get that in machine learning projects - you make some change, launch the re-training of the models and see the result next day, or in an hour, or in a week; and only then you know if the change was actually beneficial.
Re:How the Pomodoro Technique changed my workday by JoachimS on Tuesday November 17, 2015 @09:32PM (#10585546)
You lucky bastard!

I remember the joy when we got Cadence BuildGates to start running parallel synthesis and optimization runs. This allowed us to go from one build per week to two. If we were lucky!

Re:How the Pomodoro Technique changed my workday by duggan on Tuesday November 17, 2015 @07:06PM (#10584957)
Some of us have an idea, if only because a full build and integration test cycle for clusters of virtual machines can take hours depending on how the pipeline is organized!
Re:How the Pomodoro Technique changed my workday by InclinedPlane on Tuesday November 17, 2015 @09:10PM (#10585464)
Pffft. They have no idea what it's like to work on really big software projects.
Re:How the Pomodoro Technique changed my workday by saurik on Tuesday November 17, 2015 @08:00PM (#10585201)
> I don't have ADHD in real life, but when I'm hacking, I can't wait that long, so I'll alt-tab and look at HN or whatever for "5-10secs"

You have created a problem for yourself that should not exist: do not task switch to Hacker News, task switch back to your text editor to re-read the code you just added or to work on the next part of the problem; or you could be working on two parts of the project at once and keep rapidly flipping back and forth between them. Your issue is not that you don't have the patience to wait for five seconds: it is that during those five seconds you are doing something useless instead of something else important.

In all seriousness, once you stop thinking of "patience" as "I need to be able to sit on my hands and wait" and instead think of it as "I now have the opportunity to do something else for the next period of time that I should try to make as productive as I can", I don't think ADHD is the problem anymore: the issue is making sure you always have a fun productive side task. You might find yourself accidentally doing things you realize later had low value for the time, but at least you got something done, right?

Put another way, you should embrace ADHD, not fight it: once you get into the habit of distracting yourself with just another task, the 5-10 seconds of compile time no longer matters, as you routinely switch to another task for five minutes every time you compile and it doesn't matter how long the compile took. You can do this with everything: I deal with delays in my web page e-mail client by having two or more clients open at the same time where I am working on two different search and reply tasks.

Re:How the Pomodoro Technique changed my workday by Trill-I-Am on Tuesday November 17, 2015 @08:36PM (#10585337)
I don't think this method can work for me because I hate cognitively switching from one task to another.
Re:How the Pomodoro Technique changed my workday by CydeWeys on Tuesday November 17, 2015 @09:51PM (#10585614)
Even if the tasks are related, in that they both involve writing code in the same project? I find that I can handle that pretty well, and I'm distracted a lot less by coding on two different parts of a project simultaneously than by trying to simultaneously do coding and also doing a task of a different type, like reading/writing documentation or email.

If you think about it, some really complicated coding sessions require keeping the state of many pieces of the program in your mind simultaneously (see, e.g., this: http://heeris.id.au/2013/this-is-why-you-shouldnt-interrupt-... ), including code in many different files. This is actually more difficult cognitively than simply working on two separate simple and well-contained coding tasks simultaneously.

Re:How the Pomodoro Technique changed my workday by firebones on Tuesday November 17, 2015 @10:42PM (#10585768)
There's a writing tip that you don't quit until you know what the first sentence you're going to write the next day is.

I haven't tried this for coding, but the equivalent would be not to start running a test until you know what the next function/method/commit you're going to make is. Even if you have to screw around looking for potential problems in your code, or potential places to refactor, don't run the tests until you know what that next thing is going to be.

Here's the actual Hemingway quote:

The best way is always to stop when you are going good and when you know what will happen next. If you do that every day when you are writing a novel you will never be stuck. That is the most valuable thing I can tell you so try to remember it.

Re:How the Pomodoro Technique changed my workday by burkemw3 on Tuesday November 17, 2015 @06:08PM (#10584682)
This used to be a bigger timesuck for me because I didn't always have a good interrupt to tell me that whatever process (e.g. compile) had finished.

I've since added a bash alias that helps: `alias beep="echo -e '\a'"`

`burkemw3@laptop$ compile ; beep` makes sure I don't have that excuse anymore.

Re:How the Pomodoro Technique changed my workday by m_mueller on Tuesday November 17, 2015 @09:29PM (#10585535)
On OSX you can also let the terminal bounce until you open it again in foreground.

Edit: need to use `printf '\a'` for that

Re:How the Pomodoro Technique changed my workday by JoachimS on Tuesday November 17, 2015 @09:34PM (#10585555)
Those bounces by iTunes for example are soo annoying and distracting. Is there any way to kill them system wide?
Re:How the Pomodoro Technique changed my workday by m_mueller on Wednesday November 18, 2015 @02:21AM (#10586448)
It annoys me too, but in case of the terminal bouncing this is deliberate so I get back to work ;-). To disable it:

`defaults write com.apple.dock no-bouncing -bool TRUE && killall Dock`

Re:How the Pomodoro Technique changed my workday by mkopinsky on Wednesday November 18, 2015 @12:29AM (#10586095)
I have alias foo='bar;tput bel' in my .bash_profile which does the same thing.
Re:How the Pomodoro Technique changed my workday by cpeterso on Tuesday November 17, 2015 @08:01PM (#10585208)
On OS X, you can use `say` to shout at you when your build is finished. :)
Re:How the Pomodoro Technique changed my workday by marvelous on Thursday November 19, 2015 @05:26AM (#10593938)
With gnome-terminal, I get a notification when a command finishes in a terminal that isn't on the foreground. It's very useful.
Re:How the Pomodoro Technique changed my workday by mikekchar on Tuesday November 17, 2015 @08:53PM (#10585401)
I wish I had a reference for you, but I recall reading some UI guidelines that discussed how long you have before you need to give feedback to your users. IIRC 2 seconds was the longest amount of time that didn't feel like you were waiting forever. Once you got past 6 seconds, basically people think it is broken.

I have the same experience as you do, and these numbers of 2 seconds and 6 seconds really seem about right. If the test runs in less than 2 seconds, I can stay focussed on what I'm doing. By 6 seconds, I'm already thinking about something else. My personal experience has been that if the tests takes longer than 2 seconds, it is virtually impossible to do TDD. Instead you have to write large chunks of code -- or at the very least write several tests in one go.

I'm fairly well known in my current group for the 2 second rule :-) 2 seconds is really a long time for a modern computer, so my feeling is that if you can't build and run a large section of tests in 2 seconds, you've got a serious problem somewhere. When pairing with people who don't mind longer test runs, I've noticed that they never actually TDD. Instead they right large pieces of code (entire functions at the very least), or they write 5-10 tests all in one go. When I show people the normal rhythm of TDD, they suddenly understand why you need to have incredibly fast tests.

I also preach a 2 minute limit for the entire test suite. Kent Beck has talked about that previously (although I can't remember what number he used -- something like 2-4 minutes). He has even advocated simply throwing away long tests. Test coverage is less important than being able to run your tests quickly. I have found that if the test suite creeps up to about 10 minutes, the frequency of running that test suite is reduced to about once per day -- meaning that you have totally lost the context of the problem when you discover it.

Whatever you need to do to keep those tests running quickly is what you should do. Whether that means only running a subset, hot loading modules, stubbing out slow moving pieces (even the database), etc. I could write for quite a long time on testing strategy... This needs to go on my queue for a blog post ;-)

Re:How the Pomodoro Technique changed my workday by CydeWeys on Tuesday November 17, 2015 @09:47PM (#10585593)
Cloud development and testing help a lot too. I can kick off a run of the entire test suite in the cloud, and get right back to coding, all while keeping tabs on the tests' output in a tmux terminal.

I'm typically editing in parallel with tests running. This can frequently result in no down time whatsoever owing to tests, even during a large refactor. Let's say I make a big refactor and 90 different test classes break (this is not theoretical). I modify some code that might make one of those test classes past, kick of a test run, and immediately go edit another failing test class. By the time I think I've got that figured out, the test run on the first has completed, and I can either move on, or try something else to fix it if it's failed again. This requires keeping the state of multiple test classes in your head simultaneously, but fortunately I'm good at that.

Re:How the Pomodoro Technique changed my workday by db48x on Tuesday November 17, 2015 @06:35PM (#10584820)
I agree 100%; compile times must be fast or I get distracted. Right now I'm waiting for tests to run which takes ages and ages; it's the same problem.

I've found that I'm extra productive in lisp because I'm evaluating and compiling a single function at a time, usually. I can cycle between testing that one function and fixing/finishing it very rapidly since it never has to build or reload the whole thing. A lot of the time it doesn't even require leaving the editor.

Too bad I've so far only been able to use lisp on personal projects.

3/61 tests passed...

Re:How the Pomodoro Technique changed my workday by dugmartin on Tuesday November 17, 2015 @06:25PM (#10584774)
My solution has been to block all my "time suck" sites in my host file and then only browse them on my phone. If I pick up my phone during some 10-20 second pause I'm more likely to put it down than if I just open a new tab and start browsing.
Re:How the Pomodoro Technique changed my workday by creullin on Tuesday November 17, 2015 @05:28PM (#10584458)
Yep, same boat here. Even in Web dev if the page takes too long to load, or an API call is slow...off to HN
Re:How the Pomodoro Technique changed my workday by trevor-e on Tuesday November 17, 2015 @06:29PM (#10584793)
It takes my Android project 2+ minutes to compile each time. I'm going insane. Since we've been burned a few times already, we made the decision as a team to always compile with Proguard turned on. Trying to find some middle ground right now.
Re:How the Pomodoro Technique changed my workday by jklp on Tuesday November 17, 2015 @07:36PM (#10585100)
Why not disable proguard on dev and then let CI compile with proguard on?
Re:How the Pomodoro Technique changed my workday by m_fayer on Tuesday November 17, 2015 @05:54PM (#10584615)
Same here, one thing that sometimes works for me is making sure I have no browsers open at all. Then the inevitable speedbump of opening a browser and waiting for my machine to recover from the 50 tabs all suddenly coming to life keeps me from doing it, and instead I stare into space and think deep thoughts for 10 seconds.

It sure is hard to close that browser once it's all warmed up and full of interesting things though...

Re:How the Pomodoro Technique changed my workday by larrywright on Tuesday November 17, 2015 @10:19PM (#10585689)
This became a bad habit for me too, and there are limits to how fast I can make things. My solution was to install an app (Focusapp in my case) that blocks distracting websites. And I mean blocks them hard - reboot won't stop it. And it's on a schedule, so it blocks from 7am-5pm, every day.

It sounds a little heavy handed, but it made a huge difference.

Re:How the Pomodoro Technique changed my workday by intrasight on Tuesday November 17, 2015 @07:39PM (#10585117)
What I don't understand is why, with Moore's Law and all, my builds take just as long today as they did 20 years ago.