Hacker News new | ask | show | jobs
by pjam 2043 days ago
This is great and really useful to me! I am also, like others here, in the process of writing my first "book": https://redis.pjam.me/. Mainly inspired by https://shop.jcoglan.com/building-git/, rebuilding Redis, instead of git, in Ruby.

> For my first few sections I wrote the code as I wrote the sections, but then Lak made the suggestion that it would probably be easier to write the code first and then write the chapter

I can echo this a thousand times, I've written the last three chapters this way and this has made a huge difference, wish I had known that earlier!

I will also add that it really made me learn so much because even though I thought I knew quite a bit about Ruby (I knew early on that I didn't know much about Redis). So many times I found myself trying to explain something and realizing that I didn't actually know how it worked and ended up spending hours (days?) researching the inner workings of said thing

PS: Using quotes around book mostly because that's the imposter syndrome kicking in, I was calling it "a series of blog post" for a while, to kinda downplay it

2 comments

> So many times I found myself trying to explain something and realizing that either I didn't actually know how it worked and ended up spending hours (days?) researching the inner workings of said thing

This has been, by far, the best thing about writing.

It is also, by far, the worst thing about writing. The constant terror that I am full of shit.

This is a good tip. If you are writing a project/code heavy book, write the code first. They re-write the code taking intensive notes along the way. There's your outline.