Source code repository discussion

In this forum you can write about anything that does not fit in other forums.
This includes generic Oric talkings and things that are totaly unrelated but want to share with people here :)
User avatar
Symoon
Archivist
Posts: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: Source code repository discussion

Post by Symoon »

Just my 2 cents: I'm not a professionnal programmer anymore, and I've been recently working in a team using Git. It's a real pain for people that don't know how it works. I tried to give a go at learning the commands to read some code, but as I use them once or twice a year, I always forgret.
So it certainly looks like a porwerful tools, but am I alone seeing it as a wall between the casual programmer I am, and the source code?
(I am aware that this post doesn't help solving any issue on source code management... What I mean is that some occasionnal Oric contributors may not have the energy or spare time to work as professionnals, and might give up if things get complex, being afraid to destroy something).
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Source code repository discussion

Post by Dbug »

That was the main justification for going with SVN: Easy to learn and use, hard to misuse.

@Ibisum: What makes gitlab better than GitHub?
User avatar
ibisum
Wing Commander
Posts: 1646
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: Source code repository discussion

Post by ibisum »

gitlab: infinite private repo's, you can easily move from hosted to local-instance gitlab servers if you wanna, and I find the web interface a bit more streamlined, although its of course a taste thing.

Re: SVN: git branches > svn trunk bollocks.
User avatar
Badger
Pilot Officer
Posts: 84
Joined: Sat Sep 22, 2018 10:04 am
Location: Wigan, England

Re: Source code repository discussion

Post by Badger »

How about type in listings available on request vial snail mail :evil:

Just like trhw good ole days. For that true (and very frustrating) retro experience :)

On a serious point, for me, whatever allows me to see the source code (maybe without actually downloading it) works best. I'm kind of a "how did they do that" person, and like to look at snippets of code to get ideas and examples.
flag_uk Amateurs built the Ark, Professionals built the Titanic.
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Source code repository discussion

Post by Chema »

Hello all!

I've not entered in this discussion yet, mostly because it's been a looooong time since I last really worked in software development (mid-size projects inside a team, that is), and at that time repositories were not the standard in use (mostly shared directories and zips with dates and info). I remember SourceSafe from VisualStudio as the first contact I had with repos, so go figure how old I am :)

That being said, everybody tells me I need to learn to use git. So I tried and failed. As someone else said in this thread, I just keep on forgetting the commands, find it confusing why some files I put in my .ignore file are still being updated and all this thing about the different processes and commands I need to perform in order to update a small modification to my code. Because I mostly used repos to store my code and maybe that is my problem. I turned into using cloud folders in sync between my computers and I find it much more natural and easy. With OneDrive for Business I even have a history of each file. In the end I used Defence Force's svn as a convenient way to share the sources of my projects, and sometimes just uploaded it once the project was almost completed.

And even then I always make mistakes and upload files or folders I did not intend to, or to the wrong place, and I am never ever able to fix that :(

Indeed I tried git a couple of times. It is integrated in Visual Studio, so I used it for my Oasis Room Editor and Script Compiler (written in C# and now in some private repos I will like to share someday) and currently for coding some scripts at work using Visual Studio Code. But besides the cycle to upload changes to the repo, I am lost with everything else...branches, joins, pull requests, push, diffs.... uff... I hope a graphical tool may help with those.

Well, enough of this story, which is useless :) I'll go whatever solution you may adopt. I will try my best to learn on how to use git if needed. My view on the repository is mostly for sharing the sources of my games, and even if I don't mind people using them as they wish, I am not really confortable with the idea of people patching the games and sharing the sources here and there, because it creates confusion about the latest version. So any system that may help with adding things that are to become part of the final game (as the French translation of Blake's 7 by Laurent Den), with some kind of control, will be great!

Can you store binaries in git, such as additional tools needed to build the sources?
User avatar
ibisum
Wing Commander
Posts: 1646
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: Source code repository discussion

Post by ibisum »

Learning git opens up such an immense world of software resources, and unique and wonderful ways of looking at it, from a developer perspective. But yes, it does require a commitment - nobody can make it for you.

Whatever is used, I hope we can help each other with any of the difficulties that might arise, either way.
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Source code repository discussion

Post by Dbug »

I suggest we drop the evangelism for either source control system, Ibisum is obviously a git lover, and I'm a git disliker, and that has nothing to do with knowing in detail the system (and for the record I have worked for years with Visual Source Safe, CVS, SVN and Perforce, and had some occasional interactions with RCS, ClearCase, Mercurial, and have used git at work for some side projects so I've a pretty good idea of what can do what).

The discussion has never been "what is the best source control system", the discussion has always been "what is the source control system - all things considered -" in the context of a small community with people of various skills, some not being professional developers.
  • GIT supports branches, so does SVN
  • GIT supports decentralized work, so does SVN - Just with a different workflow (you can work on your local copy of the files and sync when you want)
  • SVN sucks at renaming files - Granted, that's the #1 problem I have with SVN
  • SVN is much better at handling binary files
  • SVN allows you to get arbitrary files in a repository, you don't have to checkout the entire thing
  • etc...
The bottom line for me is that it does not matter which feature they have, they pretty much all have history, branch, web interfaces, client tools, etc... for me in the end is the amount of time that will be spent tracking changes, find out why some where overwritten because somebody pushed their own version without realizing there was a conflict, etc... (which happened twice last week with git at work because one artist and one qa person did not understand how the system worked, resulting in an history with some merge to master bypassing some other changes made by somebody who worked on the same files).

Even if I go to SVN, you can still work on your own git based version, I don't see how it's a problem, comparing/merging/diffing source directories is trivial.
Learning git opens up such an immense world of software resources, and unique and wonderful ways of looking at it, from a developer perspective. But yes, it does require a commitment - nobody can make it for you.
Or you can just click on the Download button on github projects and get access to the software resource without even touching git at all.

Chema's experience with git is a real thing, git is hard.

Deciding to help building the OSDK is a commitment.
Deciding to do Oric software is also a commitment.

I don't want to force anyone on top of that to have to "have commitment" in learning a tool they don't have to learn just to participate to a project, the more complex it gets, the less people will participate.
User avatar
ibisum
Wing Commander
Posts: 1646
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: Source code repository discussion

Post by ibisum »

Okay, I've only put my 2c in, I'm not expecting a refund. ;P
User avatar
jbperin
Flight Lieutenant
Posts: 480
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: Source code repository discussion

Post by jbperin »

IMHO, the first thing to think of is the need that the revision control system is supposed to address.

Such a system is supposed to help managing collaborative works from several developers by keeping track of individuals changes on shared resources.

So .. it might be interesting to identify :
- what are the collaborative works (how numerous they are) ?
- who are the developers and what are their working habits ?
- what kind of changes and resources have to be tracked ?

As far as i understand from what i read here, I'm not so sure a sophisticated revision control system is required.

If the goal is only to provide a repository of validated and approved versions of resources (such as source code and medias).
If the only changes that are relevant are those leading from one stable and approved version to another stable and approved version.

Then perhaps just a web site with indexed archive to download is enough.

Even though I have nourished the hope to have some part of my code on the defence-force SVN, I have never contributed to the content of this repository. But I found lots of interesting things in it and I learnt a lot from watching sources code so I'm a total consumer.
As a total consumer, I never watched changes in time. I only downloaded sources. And from this point of view, I would have preferred some http download links with description of the content, rather than having to install SVN and issue several command to retrieve tons of sources with no idea of where things are.

As an aspirant Oric developer, I must say that I would work with any kind of tool. I don't master git very much but I managed to do what I have to do with it and I'm quite used to use it. I have an access to Oric Software github repository, so I can share my works with others and from various computer i work with.

I really enjoyed finding high quality source code on defence-force SVN repository so I like the idea that only approved and validated content can be found on it. With git, this is usually done by using a Master branch on which only tested and approved version are merged.

Perhaps the good mix would be to let people work on github as long as they develop .. and finally archive only the best and approved version on a defense-force web site.
User avatar
ibisum
Wing Commander
Posts: 1646
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: Source code repository discussion

Post by ibisum »

None of this is hard but you have to have seen the rewards of the effort required to use it effectively. Even svn is a pain in the wrong mindset. I can't imagine life without git, but hey ..
User avatar
mikeb
Flight Lieutenant
Posts: 282
Joined: Wed Sep 05, 2018 8:03 pm
Location: West Midlands, UK
Contact:

Re: Source code repository discussion

Post by mikeb »

ibisum wrote: Wed Jul 08, 2020 1:50 pm None of this is hard but you have to have seen the rewards of the effort required to use it effectively.
This is true. If it's your project, and you don't use any kind of revision control at all, then it's only your own time you waste when trying to work out why something stopped working, where to find a copy of an older version to test something, what set of files in a multi-file project actually worked together etc.

Even at the most primitive, keeping a .ZIP or a .TAR.GZ of the working directory now and then is better than nothing for a single-user project.

But, putting the effort in for any proper source control system is worth it.

Also, having seen what happens when "Use Of SourceSafe Is Mandatory!" edicts are sent out by well meaning managers to people who don't want to be bothered with it (or don't see the need), token use of revision control is less than useless.

As in "No, I haven't checked in the source code, I'm not finished (the whole project) yet" -- so nothing is under control, and the one entry in SourceSafe is "Everything happened today, by me".
User avatar
Xeron
Emulation expert
Posts: 426
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: Source code repository discussion

Post by Xeron »

I have to say I used to have the exact same opinions as dbug on svn vs. Git but when my work went all in on git and i had to learn it properly, i did an full 180 and now I love git and find going back to svn a pain in the arse.

I also have experience with CVS and ClearCase as well as svn and git.
ThomH
Flying Officer
Posts: 238
Joined: Thu Oct 13, 2016 9:55 pm

Re: Source code repository discussion

Post by ThomH »

It's pretty opaque what source code this thread is talking about, but such as it may be of any help I used CVS around the turn of the century, briefly used SVN around then but allowed every trace of it to exit my mind in the interim, and have been using git for about a decade. I've never had a repository get into an invalid state, nor had any difficulties using the basic actions — branch, merge, rebase, commit, push, pull, tag and resolving any conflicts along the way (though reuse of 'add' in that context always feels like a bit of a syntax hack). I dare imagine there's another 99% of git functionality, but I've never looked into it that deeply.

Git has some problems at massive scale, but that's just about the only objective downside I'm aware of.

I think the main arguments in favour of git over all of the other systems are GitHub and GitLab, which are both communities in and of themselves and nowadays also both provide things like hosted continuous integration. Again, I've got no idea what project this thread is in reference to, but for my emulator I have GitHub set up automatically to build the SDL version upon any push to a branch that is the subject of a pull request. Since I ordinarily develop in Xcode that maintains something I otherwise might not and gives me the benefit of passing any potential changes through at least two compilers (i.e. Clang and GCC) before merging them.

Continuous integration and source control are discrete things but amongst free hosts they tend to correlate because git is the current hot thing and cheap enough compute power for free builds is relatively recent.
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Source code repository discussion

Post by Dbug »

ThomH wrote: Mon Jul 20, 2020 10:04 pm It's pretty opaque what source code this thread is talking about,
We area talking of "svn.defence-force.org" which had the source code for the OSDK, as well as sources of some games and demos.
but for my emulator I have GitHub set up automatically to build the SDL version upon any push to a branch that is the subject of a pull request. Since I ordinarily develop in Xcode that maintains something I otherwise might not and gives me the benefit of passing any potential changes through at least two compilers (i.e. Clang and GCC) before merging them.

Continuous integration and source control are discrete things but amongst free hosts they tend to correlate because git is the current hot thing and cheap enough compute power for free builds is relatively recent.
I guess github does not support Windows targets, or is it just that you never configured it for your emulator?
User avatar
tingo
Pilot Officer
Posts: 68
Joined: Sat Jul 11, 2009 11:30 am
Location: Oslo, Norway

Re: Source code repository discussion

Post by tingo »

No matter which tool one is ... forced to use (sorry, I couldn't resist), it helps a lot if you invest some time to learn it properly. Especially if you are not a software developer, or not familiar with source control systems. When I started learning git a few years back, this interactive tutorial helped greatly: https://learngitbranching.js.org/

Just my 0.02 eurocents.
Torfinn
Post Reply