News for hackers. Stuff that matters.
Re:Functions Should Be Short And Sweet, But Why? by cheshire_cat on Wednesday January 22, 2014 @04:02AM (#7101582)
My (quite oldschool) professor taught me about this top-down design. This kind of "write as if you have all the methods you want/need" style is sometimes called "Wishful Programming" http://blog.thesoftwarecraft.com/2013/11/wishful-programming...

Bart Bakker references "Structure and Interpretation of Computer Programs" as an early source and I'm somewhat positive that I read about an similar approach in "How to design programs 2nd ed", called "programming with a wish list".

Edit: I found the mention in HtDP but as I understand it it's not exactly the same as wishful programming: http://www.ccs.neu.edu/home/matthias/HtDP2e/part_one.html

under "3.4 From Functions to Programs"

Re:Functions Should Be Short And Sweet, But Why? by agumonkey on Wednesday January 22, 2014 @06:47AM (#7102043)
I remember doing something similar in college using Eclipse/Java (but any static analysis friendly language with on-the-fly type checker would do) and it was pure fun. You just write the code as you'd want it to be, the IDE will flag missing classes/interfaces and generate them on the go if you tell them, and if down the road you use one interface differently the IDE will extend or ~reparameterize it for you. You end up with an abstract system/algorithm that works by type checked interfaces you can now implement.