What is holding you from contributing to freeciv?

Can you help improve your favourite game? Hardcore C mages, talented artists, and players with any level of experience are welcome!
cazfi
Elite
Posts: 1558
Joined: Tue Jan 29, 2013 6:54 pm

What is holding you from contributing to freeciv?

Postby cazfi » Thu Sep 21, 2017 10:53 pm

I'd like to understand what are the biggest obstacles for one becoming freeciv contributor, so we could try to lower the barrier.

For most of the first half of this year current freeciv maintainers were busy with the surprise shutdown of gna.org and resulting need to migrate our systems to other hosting providers. During the latter half of the year we need to plan and implement some updates to freeciv.org servers. As all this is time away from the development of freeciv code, this year is proving to be quite slow on development front. New contributors would be very much welcome.

User avatar
dunnoob
Elite
Posts: 326
Joined: Mon Dec 23, 2013 3:13 am
Location: Hamburg
Contact:

Re: What is holding you from contributing to freeciv?

Postby dunnoob » Fri Sep 22, 2017 7:30 am

cazfi wrote:I'd like to understand what are the biggest obstacles for one becoming freeciv contributor, so we could try to lower the barrier.
Fortunately I missed the Gna! disaster doing other things including some months offline. Found in the Geopolitical correction to standard tileset(s) thread (git fork + pull request):
Caedo wrote:that's how git works.

cazfi wrote:We can take github pull requests.
Interesting. At the moment my offline r/o copies match Gna! SVN 33766 (2017-09-16), and unsurprisingly (tested) just changing the URL to GitHub's SVN UI with `svn relocate` doesn't work. Because Slik SVN is so simple I considered to delete my copies and use GitHub's SVN to get fresh copies, when I have the bandwidth for a huge download. (More than 100 MB is huge with a mobile broadband plan limited to 5 GB/month.)

OTOH I have a GitHub account (used for one gist and some bug reports, same idea as my SF account), and I have a mostly unused git-for-windows (its SVN was broken when I wanted to get the old copies, that's how I ended up with Slik SVN, because Tortoise SVN is admin-banned on my box.)

Now I wonder what would be the least painful approach to fix 12 broken SVG flags (SVG syntax only, no new colors or shapes, part 1 of Gna! patch 7393). A somewhat less convoluted approach would be a new HRM issue listing all "now valid" SVGs by their Wiki URL with a clear instruction: "copy this crap as is to GitHub, it is visually identical to what you have (no new PNG required), but valid. And nobody cares about PD != GPL for PD SVGs from commons".

Random example (visual identity, disclaimer: I will miss minor differences), old Gna! patch number(s) at the top of the Wiki page just below the flag. The 3rd part of Gna! patch 7393 requires reviews by a 3rd party (14 flags), the 2nd part is trivial, but needs new credits in flags.spec (PD from commons). 193 broken SVG flags are not yet fixed (guess: most belong to the "just copy" or "refresh from commons now PD" cases.) The AWOL section of the Flags Catalogue covers 22 Gna! patches + 2 HRM issues, the 25 SVG flags do not yet exist on GitHub.

User avatar
Caedo
Elite
Posts: 463
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: What is holding you from contributing to freeciv?

Postby Caedo » Fri Sep 22, 2017 11:46 am

For me, the big obstacle has to be the sheer amount of code already part of Freeciv. Granted, I'm not experienced with handling my own pointers (mainly worked with Python and C# in the past), so coding in C wouldn't be the easiest thing for me anyways, but with such a huge codebase that already exists, I just can't really find the impetus to do anything. If I wanted to make any changes, I'd first have to find where to make the changes and then make sure not to break anything in the process.

That said, I am on Windows, so actually compiling and testing anything would be another journey in and of itself. I mean, I could try and see if some of the old Visual Studio versions that can be used for free allow properly working with a C other than C# and VC++, but again, that's just the smaller one of the two big obstacles.
~S.C. L.

User avatar
mir3x
Veteran
Posts: 110
Joined: Sat Jan 30, 2016 6:17 pm

Re: What is holding you from contributing to freeciv?

Postby mir3x » Fri Sep 22, 2017 2:36 pm

Caedo wrote: I mean, I could try and see if some of the old Visual Studio versions that can be used for free.


MS Visual Studio Community Edition 2017 is for free ( also older versions)

cazfi
Elite
Posts: 1558
Joined: Tue Jan 29, 2013 6:54 pm

Re: What is holding you from contributing to freeciv?

Postby cazfi » Fri Sep 22, 2017 3:10 pm

Caedo wrote:For me, the big obstacle has to be the sheer amount of code already part of Freeciv. Granted, I'm not experienced with handling my own pointers (mainly worked with Python and C# in the past), so coding in C wouldn't be the easiest thing for me anyways, but with such a huge codebase that already exists, I just can't really find the impetus to do anything. If I wanted to make any changes, I'd first have to find where to make the changes and then make sure not to break anything in the process.

We try to keep codebase well organized, but we do lack documentation. We had a plan to work on doxygen generated documentation, but that was silently forgotten. It's probably time to revive that effort. Improving the documentation could be good task for a new contributor in itself.
Caedo wrote:That said, I am on Windows, so actually compiling and testing anything would be another journey in and of itself. I mean, I could try and see if some of the old Visual Studio versions that can be used for free allow properly working with a C other than C# and VC++, but again, that's just the smaller one of the two big obstacles.

At the moment freeciv cannot be compiled with Visual Studio. I looked it a bit about a year ago, and it would be quite a task to make freeciv codebase Visual Studio compatible. It would also mean losing quite a deal of what-is-good-in-C99 constructs to make it also valid C++. It could still be worth doing for providing Windows based developers more natural development environment, but I can't currently work on it.

At the moment the idea is to make msys2 environment the freeciv development environment on Windows.
viewtopic.php?f=14&t=75398
One way to contribute would be testing that, and to report the biggest shortcomings it has.

louis94
Hardened
Posts: 195
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: What is holding you from contributing to freeciv?

Postby louis94 » Fri Sep 22, 2017 8:09 pm

Hello,

My last contribution to code is almost one year old (I think) but, and that's more interesting, my first contribution is also rather recent.

When I started to contribute to the Qt client, I was already a "good" C++ developer (meaning that I knew the language fairly well, and also some design patterns), although I hadn't ever worked on any real-life project. I had been looking at the (common) code for months, mostly for fun. I had even tried to write my own client from scratch (but failed due to what I learned later was a Freeciv bug). When I found that the help dialog was missing in the Qt client, I thought that is would be a rather easy addition with some UI design work (something that I like to do). So I just jumped in.

cazfi wrote:
Caedo wrote:For me, the big obstacle has to be the sheer amount of code already part of Freeciv. Granted, I'm not experienced with handling my own pointers (mainly worked with Python and C# in the past), so coding in C wouldn't be the easiest thing for me anyways, but with such a huge codebase that already exists, I just can't really find the impetus to do anything. If I wanted to make any changes, I'd first have to find where to make the changes and then make sure not to break anything in the process.

We try to keep codebase well organized, but we do lack documentation. We had a plan to work on doxygen generated documentation, but that was silently forgotten. It's probably time to revive that effort. Improving the documentation could be good task for a new contributor in itself.

FWIR, the lack of architectural documentation was the biggest barrier when I started to look at the code. In the end, I ended up using my IDE's navigation and search features to look at the code of functions that had promising names. I understand the architecture better now, but some parts are still unclear (AI...).

Other random stuff:
  1. Function headers often do not tell more than the function name does.
  2. specenum_gen.h is also hard to understand at first.
  3. The "unstable" state of the repo would have prevented me from contributing (but I didn't have the time anyway). It also broke down my own copies of the repo while I was away
  4. I didn't know that pull requests would even be considered (having to contribute one commit at a time is a real PITA)
  5. The only place where the status of the different branches is clearly stated is on IRC, and even there the "branched" status is somewhat unclear
  6. Working together with an "expert" on some low-priority feature could maybe help... some kind of mentoring
  7. In the same spirit, having a list of easy tasks (not only bugfixes but also additions) might help, though IIRC that jtn did try at some point and never got an answer
  8. If one knows SDL or Qt, adding/fixing stuff in the clients is maybe the easiest way to get started, because you can always look how the Gtk client does it

Caedo wrote:That said, I am on Windows, so actually compiling and testing anything would be another journey in and of itself. I mean, I could try and see if some of the old Visual Studio versions that can be used for free allow properly working with a C other than C# and VC++, but again, that's just the smaller one of the two big obstacles.

Qt Creator has autotools support (at least on Linux), I might give it a try on Windows. Providing Windows users with an usable setup would likely help getting new contributors.

Cazfi, what's your own workflow? How do you navigate in the code? Do you use feature branches?

Louis

cazfi
Elite
Posts: 1558
Joined: Tue Jan 29, 2013 6:54 pm

Re: What is holding you from contributing to freeciv?

Postby cazfi » Fri Sep 22, 2017 8:16 pm

cazfi wrote:We had a plan to work on doxygen generated documentation, but that was silently forgotten. It's probably time to revive that effort.

I uploaded current doxygen documentation for master branch: http://files.freeciv.org/doxygen/master/html/

cazfi
Elite
Posts: 1558
Joined: Tue Jan 29, 2013 6:54 pm

Re: What is holding you from contributing to freeciv?

Postby cazfi » Tue Sep 26, 2017 4:04 pm

louis94 wrote:[*]In the same spirit, having a list of easy tasks (not only bugfixes but also additions) might help, though IIRC that jtn did try at some point and never got an answer

We've tried to suggest tasks for newbies every now and then, but I don't remember a single case where someone would have been interested to do such an suggested task.
Both bugs and planned features are in hrm tickets, so in a way we do have a list of for contributors of all levels. Should we try to add some indicators there of the estimated difficulty of the tasks, or can we assume people to see from the descriptions of the features what would be within their expertise and what not?

cazfi
Elite
Posts: 1558
Joined: Tue Jan 29, 2013 6:54 pm

Re: What is holding you from contributing to freeciv?

Postby cazfi » Tue Sep 26, 2017 4:11 pm

louis94 wrote:Cazfi, what's your own workflow? How do you navigate in the code? Do you use feature branches?

I'm still trying to find best freeciv development workflow after the git migration. I do use git worktrees extensively. After twenty years of freeciv development I know quite well where things are, so for large part navigating the code happens within my head and occasional grep is enough. I sometimes use feature branches, but for most part I just have '<upstrem-branch>-work' or '<upstream-branch>-next' branches where I have all the patches I have queued for the upstream branch.

cazfi
Elite
Posts: 1558
Joined: Tue Jan 29, 2013 6:54 pm

Re: What is holding you from contributing to freeciv?

Postby cazfi » Sun Oct 01, 2017 12:56 pm

cazfi wrote:
cazfi wrote:We had a plan to work on doxygen generated documentation, but that was silently forgotten. It's probably time to revive that effort.

I uploaded current doxygen documentation for master branch: http://files.freeciv.org/doxygen/master/html/

Updated now, and I plan to keep it regularly updated as the documentation proceeds.