Δημοσιεύσεις: 8   Επισκέφθηκε από: 141 users
25.10.2021 - 01:23
 Dave (Διαχειριστής)
It only took me nearly 3 years, but finally I've reconciled all the differences between our code repository, the test server, and the live server.

The differing codebases have been a constant pain in the ass for me since I took over development in December 2018. We had our git repository where, theoretically, all the official atWar code should exist. Then we had the live server, which had mostly the same code but also some differences, including some unique code that didn't exist in the repo. And then, finally, we had the test server, which also had different stuff that wasn't in the repo and wasn't on the live server. Sometimes I might be working on a file that was different in all 3 places

When I first looked at this situation I compared each folder and found literally thousands of differences. Ignoring all the user-generated files (like maps, scenarios, user avatars, etc), there still remained approx. 15K files with differences to solve between the repo, live, and test. Most of them were probably accidental or unintentional changes, but sometimes there was work the original devs had started and just not finished. I didn't want to lose any important work that had already been done, and at that time I didn't know what I could keep and what I could get rid of. So my only choice was to compare each difference one at a time and figure it out.

It was too much to do this all at once, so I embarked on a program of cleaning up as I went. Every time I fixed a bug or made a change somewhere, I would compare all 3 versions of the affected files (repo, live, and test). In this way, I was gradually reconciling the differences over time. The downside of course was the time this took. It is one of (but not the only) reasons why every "little" change on atWar takes longer and is more complicated than it should be.

Another closely related reason why making changes on atWar was a pain was the fact that neither the live nor test servers were under any version control system. The main code repo *was* in git (a popular version control system, for you non-devs) -- the original devs started that in March 2017. However, it was never integrated with the live and test servers -- it just existed in its own separate place. I'm assuming this is because they already knew about the different codebases on live and test, and they couldn't put them into git without potentially losing all those changes, or spending the time to reconcile them.

What was the consequence of this? It meant that every time I wanted to deploy a change to the server, I had to manually compare, then copy & paste files around to multiple places, which took more time and hassle.

Now, all of that is behind us. After whittling away at the problem for nearly 3 years, I finally decided (i.e. I had had enough) that it was time to sit down and tackle whatever was left. So yesterday I started doing this. It took me literally all day, but in the end, I had reconciled every remaining difference. Along the way, I even found some interesting things I had never seen before, which I'll share with you soon. Most importantly, I setup git on the live and test servers, so now everything is connected to the same code repo. When I want to deploy something, it's a couple clicks and I'm done. No more copy & pasting files ever again

(I did the first such deployment to the live site last night, and it was wonderful.... I was so happy...)

Long story short, from now on changes can be made somewhat faster*, deployments will take less time, and I can easily go back if something breaks. These are all things that make me very happy

* I only say "somewhat faster" because there are still other frustrations to be dealt with -- for example I'm still untangling a lot of old, complex, difficult to understand code. The frontend code especially has lots of "logic" code mixed randomly with "view" code, which drives me nuts... whenever I think I'm just making a small visual change to the UI and it ends up breaking functionality in some random other place. There are plenty of other problems too, but that's another story. I'm just glad to have one less problem! Now, back to all the other crap I still have to do here...
----
All men can see these tactics whereby I conquer,
but what none can see is the strategy out of which victory is evolved.
--Sun Tzu

Φόρτωση...
Φόρτωση...
25.10.2021 - 04:33
----
Happiness = reality - expectations
Φόρτωση...
Φόρτωση...
25.10.2021 - 08:23
 Mobster (Επόπτης)
Holy shit, good work man.
Φόρτωση...
Φόρτωση...
25.10.2021 - 10:00
 Sid (Διαχειριστής)


I have no idea what most of what you're talking about means but it sounds like a lot of work.
Φόρτωση...
Φόρτωση...
25.10.2021 - 17:16
 Witch-Doctor (Επόπτης)
Γραμμένο από Sid, 25.10.2021 at 10:00



I have no idea what most of what you're talking about means but it sounds like a lot of work.


He's talking about development hell and finally undoing years of disorganization. Like cleaning up a room that hasnt been cleaned in years.
Φόρτωση...
Φόρτωση...
25.10.2021 - 19:53
 Crow
Γραμμένο από Dave, 25.10.2021 at 01:23

(I did the first such deployment to the live site last night, and it was wonderful.... I was so happy...)

I think this is the most adorable thing Dave has ever said.
----
Φόρτωση...
Φόρτωση...
26.10.2021 - 08:59
I'm a dev and I understand the pain. Anyway feels so satisfying and motivating to hear that even though I didn't do anything but kind of feels like I did haha. Gj, go wild Dave!
Φόρτωση...
Φόρτωση...
04.11.2021 - 20:13
Good job!
----
Φόρτωση...
Φόρτωση...
atWar

About Us
Contact

Ιδιωτικότητα | Όροι χρήσης | Πανώ | Partners

Copyright © 2024 atWar. All rights reserved.

Ακολούθησέ μας στο

Διέδωσε τα νέα