As I did last year around this time, I’m doing another 24-hour product challenge. In last year’s challenge, I was able to build a three-part video course called Beginning Swift that helped lots of people get started with Swift. I’m excited to be doing a new challenge this year.
The rules are the same as last year – I’ll be doing my 24 hours over 3 business days, so my challenged is scoped by working hours, rather than wall clock hours. And this year, I’m pushing hard to finish the first draft of my new book, Parsing JSON in Swift. Every Swift developer needs to parse JSON, and I hope this can help. Here we go!
9:00 AM: Planning
I spent the first hour of my challenge planning out the whole project in Trello. I already had an outline of the book and knew which chapters needed to be written, but I also have todos that’ll come later, like asking friends to review, sending emails to my mailing list, and gathering some of the articles I’ve written in the past to include pieces in the book.
10:00 AM: Creating the free sample
I wanted to be sure when I started telling people about the book that they could immediately download the free sample. (You can get it here.) So I spent some time editing the two sections that are included. And I spent way too long working on the cover. I had already designed one, but just getting it into the free sample PDF was tricky. Waste of time; should’ve just ignored the cover for now. But alas, it’s done, and the free sample looks much nicer with it.
11:30 AM: Announced the challenge to my Twitter followers
Doing a 24hr product challenge with friends. My goal: finish the first draft of my new book, Parsing JSON in Swift: https://t.co/46KurSifUu
— Josh Brown (@jtbrown) December 2, 2015
I’m always nervous about announcing these things; I tend to put a lot of pressure on myself once other people know what I’m working on. But it was time; I’ve made enough progress in the book to start talking about it, and I hope people will be interested in following along with the challenge to see how things progress.
I have 23 total sections to write, and only 5 are done so far. Better start writing. Fast.
2:30 PM: Built the sample project
I had totally forgotten about the sample project that goes along with the book until I started trying to write Creating a JSON test case. Hard to write a chapter about something I haven’t even done yet in the sample project. So I spent the last hour and a half building the sample project and writing those tests. I think it’s done now. Good enough for now. Time to move back to actually writing the book.
4:45 PM: Finished three more chapters
I’m feeling good about where I am now. Just finished the drafts of Creating a JSON test case, Why model objects?, and Transforming Swift dictionaries into model objects. All in just a couple hours. Next up: How to structure guard statements, and then I’m probably done for the night. Good day. :)
5:10 PM: Completed “How to structure guard statements”
Yeah! That makes a total of four chapters finished today, in addition to everything else I accomplished: planning, creating the free sample, and building the sample project. Good, productive day. I now have 14 chapters left, and two more days to finish them. Things are looking good.
10:45 AM: Wrote two more chapters
The book is really coming together now, and it’s starting to flow. When I finish writing a chapter, I often see how it might lead into the next, which has changed the order quite a bit from my original outline. That’s ok – the new order is better, now that there are words to lead from one chapter to the next. Finished two more chapters over the last hour: How to structure optional binding for required properties and How to handle optional properties. I still need to work on the chapter titles, but at least they capture the essence of what’s there.
12:00 PM: Playground code + two more chapters
Needed to write some code to go along with the two new chapters I just finished, so I did that in a playground. Have I mentioned how awesome playgrounds are, especially with the ability to add multiple pages? I have a playground now with about a page per chapter so I can write the sample code there, then copy it over into the book. It’s an amazing tool to go along with writing a book, since the code is all executable there and I can see the output instantly. Anyway, Should JSON parsing happen in the model object? and Handling arrays and nil are finished now!
2:30 PM: Intro, conclusion, and another chapter
I hadn’t counted the intro and conclusion in my original count of 23 chapters, but I just wrote them anyway. And I ended up removing a chapter that wasn’t going to be useful; I had covered the topic in another chapter. In addition to writing the intro and conclusion in the past hour and a half, I also wrote Use typealias to increase clarity and readability. 16 down, 8 to go. I’m tired. Time for a break as I walk home in this beautiful 36 degree weather.
5:00 PM: Three more chapters, plus some sample code
Over the past hour and a half (I had a nice long break), I was able to finish Producing specific, useful error messages to clarify what went wrong, Handling errors with do, try, catch, and Avoid NSArray and NSDictionary in favor of Swift types instead. I’m not exactly happy with all of them, and one or more may get cut from the final version, but I’m glad I wrote them anyway. I’m feeling worn out, but feeling optimistic about finishing the last 5 chapters tomorrow. I’m confident I can do this. 19 down, 5 to go.
Day 3 – The final stretch
10:00 AM: Wrote Dealing with test failures
Got started a little later than I would’ve liked this morning, but I really don’t have much left to do. Just finished Dealing with test failures, which means there are just four chapters left to write. Maybe if I have some extra time, I’ll start editing, cleaning up the sample code, and doing some more research to add more to the book.
11:30 AM: Finished a chapter, stared another. 2.5 to go!
Getting really close here. I finished The art of writing tests that ensure correctness and started Proper typing leads to less clutter. Time for a quick lunch break before I get back to it. Excited to get this finished and ready for my readers!
1:15 PM: The first draft is finished!
Yeah! Just wrapped up the final chapter of the first draft, so now I can say the first draft is complete. It’s rough – it needs lots of editing, and I’m sure I’ll rewrite large sections or maybe even entire chapters. That’s OK, though – the ideas are there, and the content is there. Feels good. Not sure what I’ll do until 5:00 – maybe I’ll edit a chapter so I can add it to the free sample. And of course there’s the sample code to clean up, testing to do, and more…
Start Parsing JSON in Swift today with the free sample.