That time novlr made the words invisible

Slap, bang, we were so close! So tantalising close to launching offline. I mean we did launch it. But there was a problem.

Last night at 00.30am GMT, we launched offline editing. We always release new functionality at least 12 hours before announcing it in case any issues crop up. Well they did. We woke up to two people rightly very worried that their words seemed to have disappeared. We reverted the code and within an hour they could see them again.

But what had happened?
Well, it’s a strange one. When you look at Novlr, you are probably looking at the most recent code, but browsers also “cache” code to stop it reloading it every time. The code can tell the browser if it is modified and that will tell it load the newest stuff. Well our code had a bug that meant that it was telling the browser that it wasn’t modified and so users weren’t getting the latest copy of the code. (If you are technically minded, details of the bug are here.) One of the things that was affected was the stylesheet which defines what everything looks like and, as a consequence, the colour of the font. Meaning that all of the words were there but were ‘invisible’! Yeah, I know. Not something we’ve come across before either!

The solution
Reverting the code, then asking the affected users to refresh brought the old code back. We then corrected the code that was telling the browser that it was always unmodified. We have also added extra caching instruction to make sure that you always have a full copy of the latest code when you need it. We launched all that today. As for the offline stuff which we had to take down, we are giving the caching 24 hours as it is new functionality, before then launching the offline work again.

Another lesson learnt and another improvement to the Novlr code and deploy process.

Oh and I don’t think I can say this enough…WE WILL NEVER LOSE YOUR WORDS. We triple back them up every five minutes to different locations, so even in the hugely unlikely event they really did go missing, we would have them.

Drag and drop & community spirit

I recently wrote we were tackling the beast that is signup, well I am please to say we have that pretty much nailed now. We have front and backend validation working a treat, secure password storage in the browser and database, constant saving, a smooth and easy process of signup and log in and all hooked to what it needs to in the backend! We have also retained authorisation on server restarts (*yawn*) which in real terms means that as we bug-fix and update your Novlr, you won’t have to keep re-logging in. It’s the little things :)

The latest challenge of the Novlr build has been the sortable chapters. One of the things you told us was most important was easily move things about at will. We know how often you novel writers change your minds! So the latest chunk of work has been doing exactly that – making an intuitive drag and drop chapter list. Now, without getting to tech-heavy, I want you to know we had to really put our head together on this one. Art and I were scribbling number arrays and proposed code logic on bits of paper for hours in Pain le Quotidien on Wardour Street in a bid to get it to do the right thing in the backend. We’re please to say that on finally figuring out what we *thought* was the best way of doing this in technological terms we turned to the community (sort of our vibe here at Novlr) for a crowdsourced opinion. If you’re interested you can read the question we asked and the generated discussion which helped us solidfiy the method we had chosen. I don’t expect anyone to be following that closely! I just wanted to demonstrate how much of the build relies on the node.js and angular.js communities – it’s expert’s brains; it’s streamlined libraries; and it’s wealth of example builds that help us get to where we are.

This made us think a lot about having a community of our own. What that would like like we’re not sure – a writing community, a Novlr-specific forum, a writing help community. We don’t know but it got us thinking and something we are going to look more into once we have beta done and the first couple of releases out of the way!

Learning node at LNUG

So one of the benefits of choosing a fast growing technology like node.js is that there’s a booming node geek scene. I’m sat at LNUG (London Node.js User Group) with about 100 other node developers, implementers etc. We’re hearing from a range of impressive node community contributors sharing some of their great work.

There really seems quite a buzz around node, which is exciting for us as we start using it. We (I say we but I really mean Kim) will be learning as much as we can from this community.

You can follow the action at @LNUGorg