News for hackers. Stuff that matters.
Re:Too scared to write a line of code by bitwize on Friday May 24, 2013 @06:10PM (#5765447)
Code is a planning language, so rather than boxes and noodles or pseudocode, I tend to sketch out my plans in code itself. In SICP this is called "design by wishful thinking": you pretend that you already have a library of primitives that do the nitty-gritty work and write the high-level bits of your program using those primitives. Then, you go back and implement the primitives.

It's surprisingly effective.

Re:Too scared to write a line of code by vog on Friday May 24, 2013 @06:48PM (#5765636)
Indeed, the "design by wishful thinking" was a real eye opener for me. It is one of my favourite parts of SICP.

It can also be explained as way to postpone decisions you can't clearly make right now. First, you pretend to have made the decision, and later on you implement the decision "you wish you had made".

Re:Too scared to write a line of code by sbilstein on Friday May 24, 2013 @08:16PM (#5765899)
Definitely an effective technique. Personally I like doing this on a whiteboard so I don't get distracted by errors or Compiler/IDE notifications and can just sketch mostly in realistic looking code.

For smaller segments though, I'll just write out function signatures, an then go back and fill em out or restructure them.

Re:Too scared to write a line of code by facorreia on Friday May 24, 2013 @09:00PM (#5765986)
This is also known as top-down design.
Re:Too scared to write a line of code by tomsthumb on Friday May 24, 2013 @07:03PM (#5765707)
> "design by wishful thinking"

aka coding by intention