Delta Engine Blog

AI, Robotics, multiplatform game development and Strict programming language

A Shinobi Needs To Work In a Clan

In my previous post I discussed some of the tools we use here in Delta Engine. In this post I will explain the terms mercurial and Team City which I briefly skimmed over in the last one. A Shinobi needs to collab and progress together with other Shinobi to achieve common goals. If there is no proper planning there can be a lot of confusion as projects get bigger they are divided into tasks and further into subtasks. Sometimes the task might require some changes in some other project which someone else is already working on. Without a proper version control in place this can go out of hand really fast. In Delta engine mercurial is used for version control. This is like git. Before joining here, in the lab that I was working we did not really have much version control. We used git mainly as a means of file transfer as the project was not that big and the parts of the projects could be independently deployed. Before git we were also using thumb drives when there was only two of us. This was also actually a kind of version control used way back in the 80s and 90s using magnetic tapes which is described very well in one of Uncle Bob's episode.  

The difference between mercurial and git is that mercurial can be integrated with tortoise workbench which provides a very clean interface. Pulling, pushing, seeing incoming change set, merging and most importantly resolving merge conflicts can be all done with one or two push of a button. This saves a lot of time. GitHub has also improved their desktop GUI, but it is not as good as the tortoise one. Also, all the branches and change sets can be seen as a road map in mercurial. It can get overwhelming at first when you are only used to command line as in case of git. Looking at all the buttons and functionality sometimes you may even get lost. If you use it for a day or two however it gets easy. One particular instance I still remember in mercurial I had, sometimes there is a lock file generated in the .hg local folder of a repository. When this happens you cannot pull or push any changes as surprise there is a lock file which you need to delete. It took me a while to figure out this problem initially. There are good solutions in stack overflow, but you need to have the right keywords. I was panicking all over the office thinking I broke my repository in the first week of work itself!

Finally, there are two important version control tools which we use here in a pipeline to check the condition of the code using team city and deploy the necessary packages as executable files or nuGet releases using octopus deploy. Team city can be called as mother of all checks. It has about 10 build steps in which it checks for duplicates, tests, coverage, TODO'S and commented out code lines.  Rule violations for clean codes is checked using both using Ndepend and ReSharper. Ndepend is a stricter version of ReSharper where it not only checks formatting of the file but for advance issues such as any of the SOLID principles are violated, cyclic dependencies or any other custom rules that  may have been added to the list of checks. This helps to ensure that the code base gets better with every major or minor change

The screenshot above shows the latest build and as can be seen all are looking good except one which had two failing tests and once it was solved the build passed. There are also various builds and projects as one could see on the left and side. All these tools helps to work in a large group easy. One can just push the changes in their local branch. It gets uploaded to team city. Team city then checks for all the rules once everything is fine it merges with the default branch. Once the default branch is created someone else just needs to merge with it and start working. This makes working in a clan much easier, saving a lot of time. 

I am thinking of making two blogs and 4 katas per week a habit. I do not know how much I can go through with it, but a Shinobi needs to be disciplined specially if I need to catch up to the level of other programmers in my team. What is a kata you ask? That is for some other time. Training ground of a Shinobi!