Version/Source Control

I have been using Dropbox as a source control system (I know it’s not proper source control) for the past 2 years, developing a single project in Xojo. I work as a single developer and I have never looked into source control. I use code commenting and Dropbox to go back to previous versions of my code. I am developing a large project btw.

I am also curious as to how many people on hear also do not use source control.

What would be a good source control system for me? What systems and processes should I setup?

Thanks

Oh boy… you just asked a very loaded question. There is so many different pieces of advice. I think we’d be smart to tackle one piece at a time.

I’ll start with something simple. Stop using Dropbox and use Git. I personally use Subversion because it is what I’m familiar with and prefer, but the overall developer community is moving overwhelmingly to Git, so it would be smart to become comfortable with it.

[quote=179815:@Thom McGrath]Oh boy… you just asked a very loaded question. There is so many different pieces of advice. I think we’d be smart to tackle one piece at a time.

I’ll start with something simple. Stop using Dropbox and use Git. I personally use Subversion because it is what I’m familiar with and prefer, but the overall developer community is moving overwhelmingly to Git, so it would be smart to become comfortable with it.[/quote]
Well, how can I switch without having to pay anything? Maybe I could switch to hosting through my paid hosting. Idk.

I’l look into Git.

Thanks

BitBucket is free, that’s what I use. That said, I’m happy to shell a few bucks on this. I’ve had my rear saved a few times when I go down a rabbit hole :slight_smile:

+1 for Bitbucket, it’s free for private projects unlike github.

Thanks for all the advice guys.

[quote=179817:@Oliver Scott-Brown]Well, how can I switch without having to pay anything? Maybe I could switch to hosting through my paid hosting. Idk.

I’l look into Git.

Thanks[/quote]

I and several others have been using Git. It is very simple to use.

I personally host my own Phabricator install, which gives me a bug tracker, source control, wiki, and ton more developer tools. Very good stuff, but it is very difficult to set up. When their hosted option becomes available, this is a very good place to look, though I’m sure it’ll cost something.

This is an area where it is wise to spend money. Free options have a conflict of interest to be honest. This is something you will rely on, make sure the company hosting it for you will lose something should they choose to shut it down. Free options are hard for the bean counters to justify, and if they shut it down, they simply gain reduced costs. You also cannot “speak with your wallet” with free options.

So like I said, for such a critical piece of your toolset, spend money. Form a relationship. You’ll be better served in the long run.

Bitbucket free repositories are subsidized by trying to get you into the Atlassian/Jira fold. GitHub is literally too big to fail now as major major companies use them so they aren’t going anywhere. Any others you will want to be a paying subscriber to make sure the business is sustainable.

probably will get shot by the code police for admitting this, but i’ve always used dropbox ( i have the pro version) and the XML file format. being able to get to the previous version of a file is very handy, and i keep common controls (external objects) in a folder structure in the dropbox too.

i’ve tried git in the past, and it always seems to be much more trouble and work than i can be bothered with,
and we have non-xojo projects in another language (thousands of source files) and 4 developers using dropbox for that also.
dropbox allows us to go back to a previous version easily enough.

[quote=179828:@Russ Lunn]probably will get shot by the code police for admitting this, but i’ve always used dropbox ( i have the pro version) and the XML file format. being able to get to the previous version of a file is very handy, and i keep common controls (external objects) in a folder structure in the dropbox too.

i’ve tried git in the past, and it always seems to be much more trouble and work than i can be bothered with,
and we have non-xojo projects in another language (thousands of source files) and 4 developers using dropbox for that also.
dropbox allows us to go back to a previous version easily enough.[/quote]

Dropbox is fine for single developers. The XML format is not very source control friendly as it will be hard to merge any changes. Once you start talking about branching and merging the VCS format is superior.

i have tried more than once to move to git, and its always seemed like another thing i have to learn (and then teach to others)
I can see all the advantages, but somehow, I’ve never quite got round to ‘committing’ to it. i suspect in the coming months i will have to because I’ve got a big project to get moving, but, i like dropbox!

I have sometimes used Google Drive for small projects, and I guess it is pretty much the same as DropBox. Problem is, it is probably fine for small projects but not when you need to keep all iterations and keep notes about the progress.

I use Git with its GitHub software on both Mac and Windows. I would not use it with the command line, such is it impractical. With the software, all I need to do is crate a new branch, which I usually go by the date, such as 20150410 and a letter, add my dev notes for that version, and push it.

The key is to have a system easy enough to use so it does not get in the way, or be so heavy one would neglect to use it. If it is simple enough, all I have to do is to push when my day is finished. Or when I just completed an important step.

About Thom’s remark, I agree that free is usually not very safe. But in their case, they seem solid enough. Besides, I use the paid option for my professional stuff.

Recently, my hard drive went bezerk on me and I lost all local files. I was very glad to have a cloud version. That said, one never knows what may happen in a data center. So, as said a friend of mine, “it is not because you are paranoid nobody follows you on the street”. In case the data center failed, I still keep external hard drives and regularly back up on them.

We have a Synology NAS with Subversion(SVN) installed.
One option might be to buy a NAS (that would be a one time expense) and you can use it for much more than just your SVN Repos.
Though you must to setup an off-site backup for your repos too If hell breaks loose :slight_smile:

Anyway, that’s how we have it setup.

I used dropbox for file sharing for a long time. We’re a 2 developer shop and work in separate locations, so dropbox was very convenient. My setup was I work in a local folder tree with a mirrored copy in dropbox. I wrote a utility to compare the folders and copy any changed files back and forth, depending on modification date. I also wrote a utility to compare the binary .rb files and report any code differences. Older versions are available from a regular backup.

I have since moved to Subversion on my own host. I use TortoiseSVN, which integrates into the filesystem and makes everything very easy and convenient. I’m not sure I would be comfortable hosting my code on a third party.

[quote=179838:@Tim Hare]I used dropbox for file sharing for a long time. We’re a 2 developer shop and work in separate locations, so dropbox was very convenient. My setup was I work in a local folder tree with a mirrored copy in dropbox. I wrote a utility to compare the folders and copy any changed files back and forth, depending on modification date. I also wrote a utility to compare the binary .rb files and report any code differences. Older versions are available from a regular backup.

I have since moved to Subversion on my own host. I use TortoiseSVN, which integrates into the filesystem and makes everything very easy and convenient. I’m not sure I would be comfortable hosting my code on a third party.[/quote]
Could you please share this code difference sharing utility?

Thanks

Setting up your own local SVN isn’t hard.
Just make sure you back up locally & offsite ESP if this is code your company relies on.

Multiple developers working in one code base in XML or Binary format saved on Dropbox is just a recipe for a world of hurt.
Been there done that have the scars to prove it.

Well due to the projects I’m working on I’ve ended up using SVN, Git and Mercurial, so let me share my perspective with you. I’d say SVN is probably the easier to pick up and if connectivity is not an issue then it probably will be all you need. If however work off line, with a laptop perhaps, then either Git or Mercurial would make better sense as you can have a local repository where you can check in changes while you work and then sync it up later when you are on line again.

As Norman has mentioned it is very easy to set up a local SVN server on your machine to play around with and see how it goes. Pluralsight have a good tutorial on using SVN and if you sign up for their trial period it should be enough for you to do the course :wink:

[quote=179828:@Russ Lunn]
i’ve tried git in the past, and it always seems to be much more trouble and work than i can be bothered with,
and we have non-xojo projects in another language (thousands of source files) and 4 developers using dropbox for that also.
dropbox allows us to go back to a previous version easily enough.[/quote]

I view SCM as a basic tool of the trade and honestly I don’t see how a team of 4 programmers can be productive without such a tool! Yes it is true that you can go back to a previous version of the code using a file share system such as DropBox, but what you don’t have is the history of the changes, unless you record it all manually. In the case of your 4 developers I’d expect they’d benefit from things such as:

  • An easy way to share and merge their code
  • Feature branches, so they can easily test out ideas and POCs without impacting the product code
  • Hot fix branches for bug fixing, releasing patches etc…
  • An easy way to revert a previous version of a file or file set, not just an entire version
  • An easy way to examine the changes that have been applied to a particular file over time, this can be very useful when you are trying to track down a bug.

Yes of course it requires effort to learn, but once you have got the hang of it you’ll wonder how you ever got along without it.

I use Fossil for years now. Its free, cross plattform and was written by Richard D. Hipp, creator of SQLite. Its lightning fast, comes with its own built in bug tracking and wiki and there is a graphical user interface for it called Fuel. Give it a try: http://fossil-scm.org/index.html/doc/trunk/www/index.wiki

+1 for fossil