Arcen Games

General Category => AI War II => AI War II - Lore, Vfx, Sfx, Code, & Meta => : x4000 September 15, 2016, 04:28:45 PM

: The insane stress of not using svn.
: x4000 September 15, 2016, 04:28:45 PM
It's funny, but in my tech demo project that I'm using, it's a pretty large thing -- 7 GB of assets, and 19.1 GB on disk once you factor in all of the shadow files and metadata files and so forth -- and I don't want to check that in to our normal svn repository host where I'd then have to pay for that storage forever.  It's not super expensive, but I see no reason to do that.

But I've been getting extremely stressed out at the inability to do things like make changes willy-nilly and revert if something is messed up, and to generally keep track of diffs to code that I make, etc.

So I finally downloaded VisualSVN Server and have set that up on my local machine just to have that in place locally.  I don't need to share this repo with anyone since it won't be kept long-term and I'll be the only one in this one, and so that's a really nice workaround.

If you're a coder and you work without source control, I don't understand how you do it. ;)
: Re: The insane stress of not using svn.
: Cinth September 15, 2016, 04:32:55 PM
Have 7 working copies scattered across your desktop for various edits and branches :)
: Re: The insane stress of not using svn.
: Tridus September 15, 2016, 04:36:44 PM
Oh god, I wouldn't have made it that long without getting some kind of source control. Not having that fallback option would drive me batty.
: Re: The insane stress of not using svn.
: kasnavada September 15, 2016, 04:37:48 PM
Git.

Local repo + repo on a server next to you...

With Git you can keep your local commits forever and only save on the main server when really needed.
: Re: The insane stress of not using svn.
: x4000 September 15, 2016, 05:06:11 PM
It's only been a few days, and I was going nuts.

In terms of Git, I absolutely loathe it.  It's slow, it's overly complicated, we used it for a while and it was a joy to stop. ;)  Been using svn for over a decade now, and while it's not the best thing ever it is the best of what I've seen.
: Re: The insane stress of not using svn.
: kasnavada September 15, 2016, 05:17:24 PM
Ah ? I don't especially like git more than that, but it sounded much like something you could need for a local repo, as it's built-in. Then again I don't especially like svn either. Some of git's tools are very, very good, like rebase and the cherry pick feature. Patching too. Where I currently work the clients keep changing what they want and that saved our a**es multiple times. SVN is much simpler to use, however, which is a big point.

Also, I'm speaking about git's current (possibly it was worse when you tried it) - and the few last years were spent on CVS... so... yeah. Possibly coming back from that makes me a bit biased. SVN evolved a bit too, I think. Didn't keep much track of that.

Best I worked with was synergy continuus though, but... AFAIK that's not deployable on a small structure at all. I think it changed names since I had to use it.
: Re: The insane stress of not using svn.
: Dominus Arbitrationis September 15, 2016, 05:23:20 PM
What I do is download a base copy of whatever I'm coding, then make local copies of it. That way, I never touch the base copy, and I always have a reference point.
: Re: The insane stress of not using svn.
: x4000 September 15, 2016, 07:17:22 PM
Making copies of the code is a really inefficient way to handle it, because then you don't have diffs set up in a centralized fashion.  Once you commit to source control and get the hang of it, there's nothing like it. :)

As far as Git goes, we were using GitHub for Release Raptor about 4ish months ago.  We used the TortoiseGit client on top of it, then later switched to using our preferred TortoiseSVN as a frontend, and it was just slow and clunky the whole time.  Part of that is probably GitHub itself, but still.  I also tried out a service that Microsoft provides Git through, and that was similarly slow, so my impression is that it's Git itself.
: Re: The insane stress of not using svn.
: Cinth September 15, 2016, 07:31:04 PM
Making copies of the code is a really inefficient way to handle it
Yes, yes it is.  But when you don't know what you're doing, you do what comes to mind first. :D
: Re: The insane stress of not using svn.
: x4000 September 15, 2016, 07:33:47 PM
Making copies of the code is a really inefficient way to handle it
Yes, yes it is.  But when you don't know what you're doing, you do what comes to mind first. :D

That is what I used to do as well, back when I was first designing the code that eventually turned into Shattered Haven which eventually turned into AI War 1.0.  That was circa 2002 in DirectDraw7, making Mario clones.  It was the year after that that I was introduced to Visual Sourcesafe, which is a travesty of source control from Microsoft.  Used that for a couple of years, maybe two at most, then a former coworker introduced me to svn.
: Re: The insane stress of not using svn.
: Cinth September 15, 2016, 07:35:47 PM
For me it was messing around in the guts of Starward Rogue.   :D
: Re: The insane stress of not using svn.
: NickAragua September 15, 2016, 08:39:12 PM
Yep, for any project of more than trivial complexity, source control is a requirement. Even if it's just you working by yourself.
: Re: The insane stress of not using svn.
: Dominus Arbitrationis September 15, 2016, 08:42:42 PM
Yes, yes it is.  But when you don't know what you're doing, you do what comes to mind first. :D
This. It also works well with smaller projects or projects where you want to force yourself to document everything and don't have source control. But, given the option, I'd always take source control of some sort.
: Re: The insane stress of not using svn.
: Cyborg September 15, 2016, 09:04:23 PM
I think the problem with git is that everyone is always merging instead of rebasing. It really requires a technical knowledge of what's going on under the hood.

One thing I don't like about version control is how it feels like you are locked into it, and every version control software feels like rebasing is more complicated than it should be. Once you run into your first troubleshooting session with a version control that is experiencing some complex problem, and you have to play tech support with your code base, you learn pretty quick that you need to be doing backups in addition to regular version control.

For this reason, I create points of time with the code saved as a directory somewhere when I'm at a key point in addition to using version control.

: Re: The insane stress of not using svn.
: Mad Rubicant September 15, 2016, 09:24:49 PM
What are the actual use cases for rebasing? I've never had to use it, and I used git for a hackathon project with 3 of my friends. The hardest part was merge conflicts, but a good IDE takes care of those for you.
: Re: The insane stress of not using svn.
: Tridus September 15, 2016, 10:23:17 PM
Making copies of the code is a really inefficient way to handle it
Yes, yes it is.  But when you don't know what you're doing, you do what comes to mind first. :D

That is what I used to do as well, back when I was first designing the code that eventually turned into Shattered Haven which eventually turned into AI War 1.0.  That was circa 2002 in DirectDraw7, making Mario clones.  It was the year after that that I was introduced to Visual Sourcesafe, which is a travesty of source control from Microsoft.  Used that for a couple of years, maybe two at most, then a former coworker introduced me to svn.

I know someone who still uses Sourcesafe. Our Microsoft rep cringed and begged them to stop. It's that bad.
: Re: The insane stress of not using svn.
: Clasmir September 15, 2016, 10:46:25 PM
How are you protecting your local SVN? Volume is on a Raid 1 volume? Shadow copy? Enterprise level backups?
: Re: The insane stress of not using svn.
: kasnavada September 16, 2016, 02:26:40 AM
What are the actual use cases for rebasing? I've never had to use it, and I used git for a hackathon project with 3 of my friends. The hardest part was merge conflicts, but a good IDE takes care of those for you.

(This reflects my experience of working, possibly, you've had others).

On SVN, basically when everyone commits, everyone else merges what others commit. Multiple people generally work on the same branch. Translated into "industry", for example, making an house, that would mean that every day you download the house and that multiple parts of the house gets "updated", you've got 50% of a window, next day 60% of a window... and so on. Problem with this approach is "merging" when multiple people try to do work on the same stuff, for example, putting water pipes into walls. You end up with 40% of the pipe in a 50% wall, both are inherently merged into one another.

On Git, you're supposed to take every dev into its own branch. That means that I'm working on the pipes, for example, and another guy does the wall. Let's say I finish the pipes before the wall are. I install them. Then the guy that does the walls finishes. He rebases his wall into the house, and the wall is done. Then, the rebasing tries to install my pipes. If there is conflict between both, then a wall / pipe merge is there.

However, both the pipe, wall, and (hypothetical) merge are still there. If later, you need to add protection to the pipes, you can remove the pipes, add the protection, and put the pipes back. Same idea if I want to replace the pipe.


On SVN, all is merged, so way more difficult to rework.


When comparing IT to industry, I find that it reinvents the wheel, most of the time.
: Re: The insane stress of not using svn.
: Mánagarmr September 16, 2016, 02:58:57 AM
ITT: Greek and latin. (Not a coder)
: Re: The insane stress of not using svn.
: barryvm September 16, 2016, 07:27:50 AM
What are the actual use cases for rebasing? I've never had to use it, and I used git for a hackathon project with 3 of my friends. The hardest part was merge conflicts, but a good IDE takes care of those for you.

Usually it goes like this:

If you want to add a feature or modify a specific feature that has low coupling with other code (e.g. you modify the implementation but not the interface) you will do a merge with the master branch after testing the feature and running automatic tests.

If you modify a piece of code that implies a lot of changes in many different places it is better pull and then rebase which will replay your changes on the master branch. Another difference is that a merge will be done on the master as a single commit while a rebase will be handled as a replay of all your commits so you can choose to partially roll back changes.
: Re: The insane stress of not using svn.
: x4000 September 16, 2016, 09:34:54 AM
I can see the appeal of Git when there's a radically different workflow, yeah.  I've never worked in that fashion with a team, however.  Instead there's always been "you work in the bathroom today, I'll be in the kitchen" and so on.  When we need to merge on overlapping files, then the conflicts are small and frequent (when they happen at all) rather than big and tough to untangle.  Because of the linear nature of how we evolve savegame files in particular, that can be really useful.

Quite often we do commits without doing updates, because I don't need the other stuff right now, etc.  It's entirely possible and reasonable to have all the various parts of your working copy on different revisions, and just update later in the day.

--

Regarding protection of my local svn, I use BackBlaze to protect all my stuff locally ($5 a month, are you joking?  I have 800 GB up there.).  So generally when it comes to backups for Arcen stuff, we have:

1. Copies on multiple machines.
2. Backups in backblaze from my local machine.
3. Our copy on repositoryhosting.
4. Their backups.

Developers that lose stuff because of theft or hardware failure or whatever baffle me.

---

By the by, when you're forcing yourself to document everything, you should be doing that in the svn logs anyway. ;)
: Re: The insane stress of not using svn.
: Aklyon September 16, 2016, 09:37:19 AM
Huzzah for multiple backups!
: Re: The insane stress of not using svn.
: x4000 September 16, 2016, 09:41:38 AM
Indeed.  I was IT before I was a coder. :)
: Re: The insane stress of not using svn.
: Vyndicu September 17, 2016, 10:32:03 AM
While reading a little bit about other experience of git/tortuisegit.

It reminds me of my time with git/tortuisegit in a short term job last year and it was weird trying to figure out how to merging/correct codes. Nevermind trying to figure where a code that was already wrote actually. The team I worked on had a coder that was sorta forgetful... He thought he already commit one portion of the code to the master branch. Only to find out it wasn't there and actually only lived on a single machine that had not been committed to the master branch.

Heh a repository ONLY works if you actually upload to it you know?!

That aside. I definitely grok where you are coming from.
: Re: The insane stress of not using svn.
: tadrinth September 17, 2016, 01:50:16 PM
Github just updated their interface for doing code reviews on pull requests and it's reeeeally pleasant to use now.  Assuming you need that sort of thing. 

: Re: The insane stress of not using svn.
: Elestan September 20, 2016, 12:33:29 AM
I'll put in a plug for Perforce (https://www.perforce.com/).  My company's been using it for over a decade for 10M+ LOC products with hundreds of developers, and it's rock solid reliable, and has a very easy-to-use GUI if you want to use one.  At least at one point, it was free for teams of less than 10 users.
: Re: The insane stress of not using svn.
: x4000 September 20, 2016, 10:33:35 AM
I had looked into them and was interested in them more than Git, but since we have binary files we need to version instead of just code files, it gets costly fast if I'm not mistaken.  Hosting it ourselves would be one option, but I don't like having our source control on our own servers that host the website, since that's a front-line for potential hackers, etc (having been hacked before, I don't like storing code stuff on web servers).  Overall right now we have about 20GB of data, which tends to exceed just about every plan, and they can get pretty expensive if they aren't built around that sort of thing.  Gets frustrating for sure.
: Re: The insane stress of not using svn.
: Elestan September 20, 2016, 11:21:01 AM
I had looked into them and was interested in them more than Git, but since we have binary files we need to version instead of just code files, it gets costly fast if I'm not mistaken.  Hosting it ourselves would be one option, but I don't like having our source control on our own servers that host the website, since that's a front-line for potential hackers, etc (having been hacked before, I don't like storing code stuff on web servers).  Overall right now we have about 20GB of data, which tends to exceed just about every plan, and they can get pretty expensive if they aren't built around that sort of thing.  Gets frustrating for sure.

Perhaps I'm just old-school, but I'd never let an external site host my non-open source code.  Plus 20GB is a lot to be externally hosted, but it's peanuts when terabyte drives are the norm.  I'd build a Linux fileserver, put Perforce on it, put it behind your firewall, and run OpenVPN to let any offsite developers tunnel through.  If you want some storage redundancy, get a Synology NAS.  Perforce will store that amount of binaries without a problem, though I'd probably segregate them from the rest of your source for organizational reasons.
: Re: The insane stress of not using svn.
: x4000 September 20, 2016, 11:31:30 AM
We don't have an office, and running a constant VPN to my home gets to be quite a problem -- I started out doing that back a long while ago.

In terms of other sites having our non open source code, I'm not exactly too worried about that given that you can reverse engineer our dlls anyhow.