Version control

I've been reviewing messages in the old Templot Club, and there are several that I feel need to be continued/actioned.

The first one that I think is critical if Templot3 is to go ahead as an open-source project is establishing a version control repository and determining who will have rights to update code in it.

I see that SourceForge supports several flavours of version control: subversion, mercurial or git. At this stage I think it is a done deal in the IT world that git has won (sadly), so I would suggest that git be adopted as the version control system of choice. It's not a simple system to use, but it is very powerful and as a distributed system it is very easy to fork or move to another host if that is ever required.

I've not worked on open-source projects before, but my understanding of the normal workflow is that a small group of people (maintainers) are given read-write access to the repository. Everybody else in the world only has read-only access.

If someone who is not a maintainer wants to make a change to the code, they can submit a "pull request" containing their changes. A maintainer can then review the code, and if it is acceptable, they can then merge the code into the repository. This can potentially be quite a bit of work for the maintainers, but is essential to prevent random vandalism of the code :-(

So the action items from here are:
  • create a git repository in SourceForge and populate it with the current Templot3 code
  • nominate maintainers, and provide them with developer access to the repository.

From looking at the old messages, my immediate thoughts for possible maintainers (beyond Martin of course) would be Graeme in Bangkok and Andrew Hunt who appear to be people that have taken a serious interest in the code recently. I would also happily offer myself as well, but I am very new here so I wouldn't expect to be accepted immediately :)

Regards,
Alistair W.
 
_______________
message ref: 447

Martin Wynne

Admin
Location
West of the Severn UK
Info
Please do not send requests for help direct to me via email.

Post your questions on the forum where everyone can see them and add helpful replies.
Hi Alistair,

Welcome to Templot Club. You've been a member for 4 years, but I think this is your first post. :)

We have had assorted Tortoises and Git repositories on Sourceforge at least 3 times, and I always ended up deleting them in sheer frustration.

Have you read this topic:

https://85a.uk/templot/archive/topics/topic_3652.php#p29499

That was 9 months ago now. It looked promising, but neither Graeme nor Andrew have posted since, and neither of them have registered on this new forum. Previously we also had Adrian, but he also disappeared. Do you detect a pattern here? :)

I suspect what happens is that coders who are not actually Templot users discover the T3 code on Sourceforge, and get all enthusiastic -- until they realise just how much work will be needed to convert a program developed piecemeal over 40 years, using a 25-year-old compiler, into anything resembling a modern open-source project. :(

I'm willing to have yet another go at setting up a version-control repository on Sourceforge, but I need to have it explained in terms of nuts and bolts, not pages of acronyms and terminology I don't understand. I need some convincing that the time and trouble will be worth it, and that anyone will be taking any interest in it in say 6 months time.

At every turn when looking in the Help, I was told that I must enter X, but never ever told WHERE I must enter it. Every likely-looking box was always greyed out and disabled. It was almost impossible to understand whether I was interacting with a program running on my computer, or code running on the server, and sometimes both at once. In the end it all got so frustrating that I threw it out of the window and deleted the lot. That has happened no less than 3 times now.

I suspect that a lot of the problem is that a program which has no overall design or structure is impossible to convert to a modern modular project. Templot developed over 40 years, originally for my own use only, by bolting bits on as and when I needed them, and then unbolting them, or bits of them, and bolting them on somewhere else, or something else in their place. Some bits were tied on with string. It's the original Meccano tea trolley which morphed into a combine harvester, with bits of hovercraft attached, and it's all still exactly the same. :(

Time for a boiled egg.

cheers,

Martin.
 
_______________
message ref: 456
Hi Martin,

Yes, I can see you've had a somewhat unfortunate history of setting up version-control repositories.

I suspect that a lot of the problem is that a program which has no overall design or structure is impossible to convert to a modern modular project. Templot developed over 40 years, originally for my own use only, by bolting bits on as and when I needed them, and then unbolting them, or bits of them, and bolting them on somewhere else, or something else in their place. Some bits were tied on with string. It's the original Meccano tea trolley which morphed into a combine harvester, with bits of hovercraft attached, and it's all still exactly the same. :(

It is clear from looking at Templot that there is a vast amount of knowledge embedded in the code (I found it interesting that the Wikipedia page for Railroad Switch refers to Templot!)

Converting it to a "modern modular project" is a simple process - just long and tedious. It is simply a process of picking one little piece at a time and "fixing" it so it fits into an overall idea of what the design should be... I've done this sort of thing before (for work) and it is certainly tedious, but it is quite possible.

One of the major problems with this approach that you need to be aware of (and ok with), is that once this process starts the code will rapidly diverge from where it currently is, which will make any form of code mobility between Templot2 and 3 very difficult.

I'm willing to have yet another go at setting up a version-control repository on Sourceforge, but I need to have it explained in terms of nuts and bolts, not pages of acronyms and terminology I don't understand. . I need some convincing that the time and trouble will be worth it, and that anyone will be taking any interest in it in say 6 months time.

I'm willing to have a go at helping set this up, but it will be learning experience for both of us :) I'm quite familiar with git (I was "volunteered" at work to be a "git evangelist" when we converted from Subversion to git), but SourceForge is new to me.

I have just gone through the process of registering on SourceForge (my username there is award65) and setting up an SSH key.

I don't have a project on SourceForge to play with, so I'll be guessing a bit, but the basic steps required will be:
  1. Create an SSH Key and enter it into SourceForge (if you haven't already done this in the past).
  2. Create a git repository on SourceForge.
  3. Optionally, change the default "master" branch name to something else (usually "main"). Not strictly necessary, but an important step for inclusivity - master has bad connotations for many people.
  4. Clone the empty repo to your PC.
  5. Copy all source code files to the repo directory.
  6. Create a .gitignore file. A sample .gitignore for FPC/Lazarus can be found at https://github.com/github/gitignore/blob/master/Global/Lazarus.gitignore. This file tells git what files should *not* be saved into the repository.
  7. Commit the project to your local repository
  8. Push from your local repo to SourceForge
While I would like to say that I absolutely will still be here in 6 months time, I can't guarantee that (I could beat you under that bus :) ), but what I think I can say is that without a proper repository the chances of any outside development happening are slim to zero.

Please let me know what additional help is needed if you want to try setting up the above. If you want me to do any of those steps for you, I can also do that. Steps 1 and 2 must be done by you. I could do the rest if given developer access to the project (and you're happy with using the source code from the zip file as the initial commit).

Regards,
Alistair Ward.
 
_______________
message ref: 463

Martin Wynne

Admin
Location
West of the Severn UK
Info
Please do not send requests for help direct to me via email.

Post your questions on the forum where everyone can see them and add helpful replies.
Create an SSH Key

Hi Alistair,

Here we go again. What is an SSH key? If I ever knew, I have forgotten.

I think SourceForge was originally set up for Tortoise/Mercurial, and only later added Git.

Of the two, I found the Mercurial thingy marginally easier to grasp, and Git utterly unfathomable:

https://www.mercurial-scm.org/

In fact, I seemed to be making some headway with the 3rd install of Mercurial, although depressed by the sheer amount of time and work needed, which would contribute not one iota to the actual functionality of Templot. When there had been no activity on it for several months I decided it would be time wasted, deleted the whole thing and left a simple download zip for anyone who wanted it.

To be honest, I have latterly tended to regard T3 as a dead-end backwater of Templot, left purely as an insurance fallback against that dreaded bus. There have been so many developments in Templot2 over the last 3 years that simply getting T3 to catch up would be a massive effort in itself, not to mention all the still-missing components from the original. I have a further update of T2 in the works with several new functions which will further widen the gap.

But first I have the fallout of the move to a new forum and server to deal with, including creating a searchable archive of the old forum. There are straws in the wind which suggest the old web site may vanish into thin air sooner than I was expecting. This awful Covid thing is affecting everything.

Until it is all moved and running smoothly, with no dead links or lost info, everything else is on the back burner.

But if T3 could be resurrected as an active ongoing project, and fully up-to-date with T2, that would be great. But I fear it is something of an impossible dream after so many false starts.

cheers,

Martin.
 
_______________
message ref: 464
What is an SSH key? If I ever knew, I have forgotten

An SSH key is actually a pair of keys, one public and the other private. You keep the private key secure for yourself and put the public key onto SourceForge. Whenever you use SSH (Secure-SHell), these keys are used to establish that you really are you :) Because only you have the private key, this can be used in place of usernames and passwords.

Of the two, I found the Mercurial thingy marginally easier to grasp, and Git utterly unfathomable.
I completely agree - Mercurial would have been my personal choice a couple of years ago, but sadly the "war" has been won by git. Even bitbucket (set up by the creators of Mercurial) have dropped Mercurial support and switched to git.

But if T3 could be resurrected as an active ongoing project, and fully up-to-date with T2, that would be great. But I fear it is something of an impossible dream after so many false starts.

It is clear to me that you have been burnt too many times, and don't have the time or energy to put into T3, and this is quite understandable.

I have a proposal for you. I will create a "fork" of T3, and set it up as a new project, probably on github as it has a few more services available. I'll include appropriate links back to Templot.

Lets give it 6 to 12 months to see what progress happens, and if it looks like it is making progress that is of interest to you, then *at any time* you can pull it back to SourceForge and continue with it as an "official" Templot project.

No effort or time required on your part, except maybe keeping an eye on what activity there is (and occasionally being asked questions about the code).

Regards,
Alistair Ward.
 
_______________
message ref: 465

Martin Wynne

Admin
Location
West of the Severn UK
Info
Please do not send requests for help direct to me via email.

Post your questions on the forum where everyone can see them and add helpful replies.
I have a proposal for you. I will create a "fork" of T3, and set it up as a new project, probably on github as it has a few more services available. I'll include appropriate links back to Templot.

Lets give it 6 to 12 months to see what progress happens, and if it looks like it is making progress that is of interest to you, then *at any time* you can pull it back to SourceForge and continue with it as an "official" Templot project.

No effort or time required on your part, except maybe keeping an eye on what activity there is (and occasionally being asked questions about the code).

Hi Alistair,

That's fine by me. :)

In fact it is what I expected to happen when I first made Templot open-source, that everyone would create their own "fork" of Templot and develop it in line with their own particular interests. Not necessarily on SourceForge, I know some members here are, or at least were, interested in learning to code and tinkering with Templot on their own computer just for their own use. This fun aspect all got rather lost when talk of SourceForge and version control systems started.

I do wish to make clear that regardless of what happens to T3 I intend to continue with Templot2 development and release non-open-source updates, at least until the obstacle of replacing the licensed components is overcome. Templot users do need the Sketchboard and PDF exports, for example. On top of that, the NLS map captures are an essential function for many, so we need an embeddable browser which returns the current URL. And Windows EMF metafiles are essential to the working in several places.

I will email you about the Sketchboard problem, which also affects the current XML engine.

cheers,

Martin.
 
_______________
message ref: 469

Paul Boyd

Member
Location
Loughborough, UK
This fun aspect all got rather lost when talk of SourceForge and version control systems started.

Hi Martin, that's what happened with me, I think. I don't know if I'll ever be able to do any tweaks to my own version of T3, but I sort of lost interest when someone came along and seemed to want to take over control of everyone's projects and all the acronyms and unfamiliar names and processes started appearing. I hate TLAs! The idea of sharing bits of code that we could patch into our own copies does still appeal though.

The other factor was Templot no longer needing the internet lookup in order to run - I was previously worried that if the proverbial bus came along and a train crashed into the server room, that I'd no longer be able to get at my designs! Of course, that worry is no longer relevant.

I'll be keeping half an eye on this thread!

Cheers,
Paul
 
_______________
message ref: 470

Martin Wynne

Admin
Location
West of the Severn UK
Info
Please do not send requests for help direct to me via email.

Post your questions on the forum where everyone can see them and add helpful replies.
Hi Alistair,

I've read back through these recent posts, and I think my tone might have seemed a bit less than enthusiastic.

I'm sorry about that. I do really welcome your new interest in T3 and the possibility of getting something going again.

The dream would be to have a thriving project of Templot3 which was a fully functional equivalent to Templot2. The latter could then be retired, while I sink slowly in the west after all these years, knowing that Templot is in capable hands for the future.

The snag is that it seems an impossible dream at present, with so many obstacles to progress, and so many loose ends.

In the previous attempts, I felt that a lot of the problem was that those involved weren't actual model track builders or Templot users, being more interested in coding for its own sake than actually using the program. I was a bit surprised when after posting several chunks of code, Graeme said he had never actually used Templot and intended to learn it.

At least I know that you have been reading about railway track on Wikipedia. :)

Welcome again to Templot Club, Alistair.

cheers,

Martin.
 
_______________
message ref: 488

graeme

Member
Location
Bangkok
Ahhhhh - so THIS is where you've all been hiding! I somehow missed the fact that I needed to re-register. :rolleyes:

I was keeping a gentle eye on things (i.e. reading the latest postings when I got an email) but when it all went quiet I just assumed everything ... well ... had just gone quiet! hahaha

OK - lots of things to answer ...
  1. Hi Alistair. It's great to see you are interested in carrying this forward.
  2. Absolutely happy to help out with the repository. I have just one request - I have a repo already that is based on an old version of Martin's source code. As I have based my PDF development on it (around 20-30 commits, as I recall) it would be great if we could use that as the base, so we are all working from the the same starting point. (Actually that should read "so it's easy for me to integrate the PDF work". :) ) I don't meant to say that I am particularly interested in owning the "original" Templot 3 repo. I do have a Templot3 repo in Github, but I will be happy to delete that and re-fork from yours if that is what you would prefer.
  3. I have contributed to a few open source projects (nothing major, I hasten to add) and the process you outline is spot on.
  4. "Converting it to a "modern modular project" is a simple process - just long and tedious" - absolutely agree, though your approach (not to mention your definitions of both "long" and "tedious") is likely to temper as you expose yourself more and more to the code. As Martin says, 40 years-worth of layers upon layers is a lot of unravelling. :) Anyway, you seem to have made a good start to plumbing the depths so here's to much happy tedium🍻.
  5. Martin : "Graeme said he had never actually used Templot and intended to learn it." This should not have been a surprise. In my intro message I did try to make it clear that I was a developer who had just 'found' Templot (rather than a railway guy who wanted to learn to code) and was interested to help. I seem to recall that at the time you were bemoaning the fact that, having bowed to requests from users you had open-sourced the code 6 months previously, and in that time not one single line of code had been contributed. In my enthusiasm to show you that you had made the right decision, I contributed code.
Anyhoooooooo ... great to be back in the land of the living (although as the UK climbs back out of lockdowns, we seem to be just starting to get covid here in Thailand 😕)

Alistair: with regard to point 2 above, I have given much thought to how we can keep T2 and T3 working side-by-side (in particular, the mechanics around the git/github perspective) but I would like to bounce my ideas off you, if you don't mind. As this is virtually certain to overstep the Geekiness Event Horizon I suggest we take it offline. I'm not sure if posts to your profile are 'private' messages, but I have posted my email address there.

Cheers,

graeme
 
_______________
message ref: 1298

Martin Wynne

Admin
Location
West of the Severn UK
Info
Please do not send requests for help direct to me via email.

Post your questions on the forum where everyone can see them and add helpful replies.
I'm not sure if posts to your profile are 'private' messages, but I have posted my email address there.
@graeme

Hi Graeme,

Welcome back. :)

Everything on Templot Club is public to any registered member who is logged in.* I have removed any form of private messaging between members because I don't see it as my function to provide such a thing, and there are legal issues.

That's what email is for. If you wish to make your email address visible to other members, it's best to go to:

https://85a.uk/templot/club/index.php?account/account-details

Scroll to the bottom of the page and enter it in the About you section.

Any member will then be able to find it by going to:

member_about.png


It won't be visible to non-members or search engines.



* the exception to this is this section:

https://85a.uk/templot/club/index.php?forums/my-notes-and-files.30/

Anything posted there is visible only to you. But even there, any posted images will be visible to all via the Media gallery. It is primarily intended as an easy private backup of Templot data files.

cheers,

Martin.
 
_______________
message ref: 1299

Martin Wynne

Admin
Location
West of the Severn UK
Info
Please do not send requests for help direct to me via email.

Post your questions on the forum where everyone can see them and add helpful replies.
_______________
message ref: 1302
Top