While I’d love to see subversion really tightly integrated into Scrivener (supporting renamed documents, snapshots via subversion’s diff functionality, and a general replacement for the Backup Project To… functionality currently in Scriv…), this isn’t what I’m writing about now. I was reading about Subversion support in Scriv, and what caught my attention was a statement by Keith that he didn’t use it himself!
Every time I try to get my fellow developers to use some kind of revision control software for their code, their eyes glaze over. And when their hard drive crashes, or they accidentally forget to make a copy of the project’s directory as a backup before delving into a bunch of changes, they cry “why didn’t I listen to Robert! Woe is me for ignoring subversion, lo these many months!” Then they go back to their heathen ways as if it had never happened.
Seriously, it really makes me mad that revision control software is not the 1st thing that programming courses cover. It’s like not backing up your novel as you write it… to another storage device that won’t burn up in a fire with your machine, or get toted away by thieves clearing off your desk. It’s like not teaching auto mechanics to block the wheels of the vehicle they jack up and crawl underneath. Madness!
For the love of all that is writerly, Keith, if you’re not already using some form of revision control software, hosted on a machine in another building from your office and used daily to keep up with your incredibly valuable work, please please please start soon. I can’t count how many times Revision Control Software (subversion in my case) has saved my code from total obliteration due to bone-headed edits, hard drive corruption, or act of dog.
Pretty please?
[RCS/subversion developer evangelism complete]
P.S. Please don’t take this as me telling you how to conduct your business. I just value your work a great deal. Maybe not as much as you do…
P.P.S. This goes for all you other developer types in the forums. RCS: Use it! Subversion is great, but it’s not the only thing out there if you don’t like it.
It’s where you spend three months going to classes where you learn that getting your code to compile and run once gets you top marks. It’s where you never learn about unit testing, your user base is 2 (yourself and your professor), and theory is more important than results.
Ah, unit testing. I’ve heard of that. I saw it mentioned in the Leopard development docs but skipped right over it. Must get around to reading up on it at some point.
I’m a professional developer, let me get some coding things straight:
Testing is vital - it’s the only way to repeatedly prove your code is in working order. Otherwise you do not know.
SVN sucks for various reasons and has (especially in Open Source land) been replaced with Git.
Version Control is essential. Not only when working in teams. Version Control allows you to go back in time and try different paths in to the future (those are called branches). It also allows you to work on the same project together.
To go back to the version control integration in Scrivener, I’d love git support! Not only does this allow me to push my writing, notes etc. to some remote service like github, it also allows me to travel back in time and get back something I might have deleted earlier.
To give you an idea, a lot of Wiki sites use a similar concept. There are even a lot of wiki tools (Like the one from Google) that use git to store page revisions.
Then there is the fact that git is open source. So it won’t be any problem to include an unmodified version of it into the project. Depending on the exact license terms, you might even modify code without open sourcing Scrivener.
I can attest to how valuable unit testing is, especially in coding environments that allow loose typing and accessible class methods. However, I can imagine retrograding tests into a code-base as large as Scrivener’s no doubt is would be a massive undertaking! But, as something you do while developing (I don’t like strict TDD, but do build and test for everything in tandem) it can save a lot of frustration as the project gets complicated.
Seriously. KB is a self taught, one man show. Be as “professional” as you want just understand that his clearly successful methods should not be expected to mystically align with industry best practices. Leave the man alone and let him write his code.
As to the svn section of scrivener, it was never about code. Scrivener is about writing. Not code. Scrivener is not open source. If KB wants help with coding practices he will ask.
I hasten to add that Scrivener is indeed thoroughly tested. While I don’t do any true “unit testing”, I suppose, everything in Scrivener is built modularly. I build new code in separate test apps, thoroughly test it, and then incorporate it into Scrivener. Then I test it in Scrivener, putting it through a list of tests designed by myself for the particular situation to ensure it gives the expected results. Then it goes to the alpha and beta testers of course. I don’t just throw out Scrivener without testing it - it has a good reputation for stability, it would never have had that had I done so!
Absolutely. Nothing as complicated as Scrivener could exist without testing, and in my opinion unit testing cannot take the place of that kind of testing anyway, especially in a heavy GUI environment. Unit testing is like engineer supplied QA checklists. They’ll only find what you anticipate to fail, even if indirectly.
Agreed, and automated user-facing tests are a great next step. Here is a nice example using Objective-C with R-Spec (today I’d use Cucumber – gem install cucumber – instead).