On Tuesday 26 August 2008, Phil M Perry wrote:
> As for using a source code control system such as SVN, which has
> been discussed here, I don't see the point unless you're looking to
> have collaborative authorship.

   There is.  The big deal is that making changes to already WORKING code 
risks breaking it.  The alternative to source control management is messy -- 
which is generally to make several copies of files (or even directories) to 
make a "backup" of the working code that's being changed.  That leads to 
confusion -- which copy is the one you last worked on?  Which is 
the "master"?  Which is "stable"?  Etc.

   There's even a reason for branches when working alone -- sometimes it would 
be nice to revamp code to use another method, but which might not work out.  
In that case it's actually convenient to make a branch, and if it all works 
out, to merge it back later.  And in-between you can still be working on the 
already working code to add a feature or two, if necessary.

   A specific example: I had a Bash script that needed to do floating-point 
calculations to two decimal places.  That can be accomplished with bc, dc, or 
awk, but I wanted to try to see if I could find a way to get Bash to do it 
itself internally, so I made a branch -- because there was a chance it was 
not going to work out and I didn't want to break the "master" copy of the 
script in the meantime.  Ultimately it did work -- I found a way of using 
string manipulations to do the floating-point math (ugly, but it worked), and 
so I merged it back.  Also, later if I decide I hate the floating-point math 
using string manipulations, I can "roll back" to the earlier version and see 
how I had done it before.

   The point of source control management is really to get the "mess" out of 
your way so you can work more freely.  The point of a *distributed* source 
control management system is so that you can work in several places at once 
and be able to push back the changes to all of the locations you worked at -- 
like if you have a Desktop at home, a laptop, and a computer at work.

   The ability to collaborate with others is yet another benefit you get on 
top of all the above.

> If you have a finished bit of code that you did all by yourself, just put
> it into a downloadable (and installable, if need be) form and stick it on
> your Web site or contribute it to some public code repository. No need
> to make people navigate a source code system just to get a copy.

   Yeah, that can be a confusing experience, but at least "GitWeb" has a 
button to click on for repositories to let people download a ".tar.gz" of the 
latest files.  i.e. you *don't* necessarily need to use Git to get the files 
that are in a Git repository.

   -- Chris

-- 

Chris Knadle
[EMAIL PROTECTED]

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Mid-Hudson Valley Linux Users Group                  http://mhvlug.org          
   
http://mhvlug.org/cgi-bin/mailman/listinfo/mhvlug                           
Upcoming Meetings (6pm - 8pm)                         MHVLS Auditorium          
        
  Jun 4 - Sqeak! and eToys
  Jul 2 - KVM (Tenative)
  Aug 6 - Zenos
  Sep 3 - TBD

Reply via email to