Want to write some code? Get away from your computer
blog.rtwilson.com
Want to write some code? Get away from your computer
1–10 of 64 posts
Re: Want to write some code? Get away from your computer
#2Re: Want to write some code? Get away from your computer
#3> 5. Make small change to the code on the off-chance that it might solve the problem
Whether practising TDD or trying to formalise the problem on paper (or in your head), this is not the way to write code. Programming is not a random search problem.
These days, I tend to only step away from the keyboard when I'm losing my bearings for where I am in the big picture. Usually, that's when I'm "making small changes to the code on the off-chance that it might solve the problem"… this means I don't really know what the problem is.
Re: Want to write some code? Get away from your computer
#4While you can get the benefit of clarity by stepping away from the keyboard for a while, I've found the best return is from test-driven development. TDD forces you to think about what you're trying to achieve before you try to solve the it. The thing I took exception to in the post was: > 5. Make small change to the code on the off-chance that it might solve the problem Whether practising TDD or trying to formalise t…
"It’s very easy to slip into the mindset of:"
His point is that the procedure that he gives (in particular step 5) is the wrong one.
Re: Want to write some code? Get away from your computer
#5Re: Want to write some code? Get away from your computer
#6I try to emulate this environment (by not compiling/running code) and trying to tell myself that I really should get a large chunk of thought (followed by relatively bug-free code) down before I let the compiler/interpreter in. This discipline has helped me a lot imho.
Re: Want to write some code? Get away from your computer
#7Re: Want to write some code? Get away from your computer
#8Every once in a while I'll get motivated and start coding it up. I'll start to think "I didn't think I could do it that way when planning it on paper, but I can't remember the reason...I'll just see what happens."
A few hours later I get to the "oh yeah..." part.
Funny thing is, that works both ways. Sometimes no matter how much you plan, if you just start coding you get the positive "Oh yeah!" moments that wouldn't have happened on paper.
Re: Want to write some code? Get away from your computer
#9I think this article would be better titled "Want to write some code? Get away from Visual Studio".
This is a rant against write, run, debug, repeat, not visual studio.
Even Notepad++ has run in it.
Re: Want to write some code? Get away from your computer
#10+1. I've found that thinking hard and long about most problems before coding them results in less buggy (sometimes even no bugs!) code. I remember my friend telling me that his dad had to stand in line and wait literally days to execute code on a computer (using punch cards) and they had all the time in the world to write the code, but very little to execute it. One mistake during execution and they would have to wai…