Hacker News new | ask | show | jobs
by klibertp 4197 days ago
Your style of work is of course OK, but I'd like to point out that it's not the only one possible.

For example I tend to experiment with code as soon as I think I know what a given task is about. I fire up the REPL, create a new file and start writing. This code is of course never meant to go into production: it's just a way of structuring my thoughts. Often I do this "prototyping" in a different language than the one used for the project: languages provide certain frameworks for solving problems and by using the correct one I can cut down on the amount of code I need to write to express my thoughts (it also makes it impossible to just git add a messy prototype to the project).

I also use pen and paper sometimes, only when the problem I'm facing is larger then a few pages of code. Rather than writing I'm drawing simplified diagrams and only write down the most important bullet points for the design. But even then I tend to write at least some code as soon as possible. I treat code as one of the best tools available to help my brain think.

So for me and people working in a similar way typing speed and a good editor are important. Especially because I write so much of a disposable, throwaway code. I'm not saying it's a better way of working, I just wanted to explain to you that it's not necessarily worse than your style.

1 comments

Do you keep a log of your experiments?

I found doing so improved both my ability to recall and I also planned ahead about what I was going to test / learn.

Drawing diagrams of process flow before coding, mapping code after bashing away, though of course there are tools that automate this, help me. Drawing and writing reflectively is different to doing.

> Do you keep a log of your experiments?

Not always, but when I investigate something particularly interesting or just learned something generally useful I usually convert my playground - be it a dump from the REPL or a file I was scribbling in - into Literate Programming style document. The process of inventing narrative for the code indeed makes it easier to remember. LP is actually a very neat tool I'd like to see more people use.