Manage your code
February 25th, 2007 — 4:28 pm —One of the reasons that makes developing slate so fun is the way we manage the code. Although code management isn’t a new concept, it is a relatively new practice here at Web Services. I, for one, never used any type of version control system or anything like that in previous work. I do remember a single lesson on (CVS)Concurrent Versions System, but at the time developing a “hello world” application in CVS seemed like major overkill.
Copy and paste
As a result, I kept my former ways of cheap versioning: copy and paste. I simply would copy and paste the entire project folder and give it a name like “blog-old.” This became an immense pain when I would accidentally open the wrong folder: I would get quite flustered when none of the changes I made took affect in the browser when I refreshed.
When I started at Web Services, the situation grew even worse. Not only was I sloppily managing my code, I was sometimes working at home. As a result, I had to constantly ensure that I copied all the files from the project to my USB drive to keep the machines synced up.
Subversion
There was no way I could keep this up. As the project grew, so too did the time to copy it between machines. I can’t recall how I found Subversion, but once I did I was hooked. I installed it on our test server and started creating repositories for my projects. I loved Subversion from the moment I started using it on the alumni website. Working between two machines was a breeze with SVN.
Trac
In addition to Subversion, another application that has proved quite useful is Trac. With Trac, we instantly had a place to easily write documentation for slate (in the wiki), track changes to the repository and browse all the source, and capture bug reports, etc. with the ticket system.
Conclusion
It’s never too late to change your methods – if you aren’t managing your code beyond “copy-and-paste”, have a look at Subversion (or at least some type of version control system). It’s easy to use, and in the end provides a layer of security (peace of mind) that can’t be matched. We currently have three people using Subversion at Web Services (Dave, me, and our designer Adam), and aside from a few minor hiccups here and there, it’s been a big help.
About slate
slate is a content management system (CMS) developed using Ruby on Rails focused on rapid production of traditional websites created by WVU Web Services. Read more about why we created slate and a longer list of features of slate. You can also check out a list of sites using slate. If you have questions or comments let us know but if it's a question about open sourcing slate have a look at this article first.Archives
Recent articles
- No Wonder Rails Is Default in Mac OS X Server...
- Good News: An Open Sourced slate Is Coming
- The WVU Open Source License
- Implementation idea: .do templates
- Keeping slate Humming - Part 1
- Campfire for Design & Keeping Your Tag Cloud Running
- Custom configuration settings made easy
- HOW-TO: Add a Gallery to Your Site
- JSONRequest.post Example
- Miscellaneous
Articles
One interesting use for Subversion in relation to slate is how we manage themes. We have all of our themes in one repository. So it's really easy for all three of us to update our themes on our individual machines, do what we have to do and commit them back to the repo. No one gets out of sync (at least I haven't had any conflicts) and I know exactly who screwed up a theme ;) The cherry on top is that on slate production we actually just run a svn update for the themes once we're happy with our changes. Easy deployment! I also really like "StatsSVN":http://www.statsvn.org/ . One of these posts is going to have to be about MockBuilder.
Add comment
You are adding a new comment