{"id":68,"date":"2023-04-30T21:46:12","date_gmt":"2023-04-30T21:46:12","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/hathajac\/?p=68"},"modified":"2023-04-30T21:59:14","modified_gmt":"2023-04-30T21:59:14","slug":"was-python-the-right-choice","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/hathajac\/2023\/04\/30\/was-python-the-right-choice\/","title":{"rendered":"Was Python the Right Choice?"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large wp-duotone-default-filter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"684\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/6714\/files\/2023\/04\/chris-ried-ieic5Tq8YMk-unsplash-1024x684.jpg\" alt=\"\" class=\"wp-image-72\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/6714\/files\/2023\/04\/chris-ried-ieic5Tq8YMk-unsplash-1024x684.jpg 1024w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/6714\/files\/2023\/04\/chris-ried-ieic5Tq8YMk-unsplash-300x200.jpg 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/6714\/files\/2023\/04\/chris-ried-ieic5Tq8YMk-unsplash-768x513.jpg 768w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/6714\/files\/2023\/04\/chris-ried-ieic5Tq8YMk-unsplash-1536x1025.jpg 1536w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/6714\/files\/2023\/04\/chris-ried-ieic5Tq8YMk-unsplash-2048x1367.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Choosing a language is a long-lived decision, choose wisely!<\/figcaption><\/figure>\n\n\n<div class=\"wp-block-post-excerpt\"><p class=\"wp-block-post-excerpt__excerpt\">Sometimes when starting out on a software development endeavor, people ask \u201cWhat language should I use?\u201d as a common question. If one were to ask this question in a Reddit forum, for instance, there are many different answers but it always ends up with a response like \u201cit depends.\u201d Throughout the journey of creating a&hellip; <\/p><\/div>\n\n\n<p>Project management is a very difficult task. In fact, managing any human endeavor always presents varied and complex challenges that largely come right down to behavior. It goes without saying that a well-functioning team can achieve great things when team cohesion is high and the vision is well-understood. The most important job of a project manager is to take a team of people, who may or may not work well together, and turn them into a high-functioning team through various techniques. I\u2019ve learned that I don\u2019t yet possess those talents and it has been a struggle to bring the team together.&nbsp;<\/p>\n\n\n\n<p>On a positive note, I have discovered some excellent features in the tools that we are using which have made my development workflow and managing project tasks much easier. In GitHub Projects, you can create individual tasks on the task board and assign them to a team member. This isn\u2019t that revolutionary given that it\u2019s a project management tool. However, the useful integration is with the Visual Studio Code GitHub extension. Once a task is assigned, I can go to the GitHub extension, choose a task to work on, and it will automatically create a local branch for me to begin work. It names the branch according to my username and the issue number, which takes a lot of the guesswork out of what the branch is for. It also helps to keep me on task and write better project issues so that each issue can become a future branch. When work is complete on that issue, I can make a pull request right from the GitHub extension, wait for the GitHub Actions to finish running, and merge the pull request right in VS Code. Finally, once the branch has been merged, I can also delete both the local and remote branch in one button click. This has greatly simplified a lot of the back and forth I used to do.<\/p>\n\n\n\n<p>As we near the midpoint of this term, I began looking forward to some of the future assignments like the Project Midpoint Archive. It was in the instructions of this assignment that I began to realize I would need to be able to \u201cdistribute\u201d the game once it\u2019s finished. Not that I hadn\u2019t thought about it before, but I hadn\u2019t <em>really<\/em> thought about it until I began this assignment. At first I wasn\u2019t too worried because I figured, \u201cHey, Python is a really popular language, how hard could it be?\u201d Well, I discovered there are a bunch of different ways to do it, and again, like language choice, the answer is \u201cit depends\u201d. We started our project with the Poetry package manager and it was doing a great job for development work. It also has a build system that can create Wheel files and TAR files file package distribution. Now normally, if we were just building Python modules that would go into a package repository to be consumed by another project, this would be perfect. However, this game relies on JSON files for loading in information about the rooms, the items, and so on. If we distributed the game as a Wheel, for instance, after installation, none of the JSON files were placed near the game and it had a lot of problems.&nbsp;<\/p>\n\n\n\n<p>At this point, I decided it would be a good idea to try and find out about other package management systems and tools to distribute Python code. I came across a few strong contenders with PyInstaller and Briefcase but in the end I decided that neither one really does what I want it to do. Briefcase appears to be a good tool for projects that incorporate graphical features such as projects built with PyGame. PyInstaller seems to do well for simple projects, but becomes hard to configure as projects grow more complicated. Neither of these would handle the JSON files and so the executables would throw errors saying they couldn\u2019t find the files. After reviewing installer documentation for about 3 hours, I realized just how much the language affects the project. I have used other languages for work, C# for instance, and distributing a C# project of this complexity is very straightforward and works every time. Now distribution isn\u2019t the only factor, but can certainly influence the direction of the project especially if it is to be a commercial success where distribution and installation are mandatory. This isn\u2019t a deal-breaker, however. It just means that I may end up needing to find some combination of approaches that will allow for a simple and smooth experience for a user.&nbsp;<\/p>\n\n\n\n<p>Despite a few challenges along the way, I\u2019m quite confident that this project will be a success. At the beginning of the project, all I could see was \u201ccreate a game\u201d. But, after spending some time working on the project and watching the structure grow and change, I can definitely appreciate the term \u201cgame engine\u201d. I never really gave it much thought before, but essentially we are building a very small scale text-based game engine that could be used for multiple adventure games. This was somewhat difficult to envision at first, but now it\u2019s becoming much more clear. After graduation, I would like to take what I\u2019ve learned on this project and try to build a text-based adventure game engine using F#, a language that I\u2019ve recently grown to love.<\/p>\n\n\n\n<p>So, was Python the right choice? Well, if you haven\u2019t discovered it by now, it really just depends.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes when starting out on a software development endeavor, people ask \u201cWhat language should I use?\u201d as a common question. If one were to ask this question in a Reddit forum, for instance, there are many different answers but it always ends up with a response like \u201cit depends.\u201d Throughout the journey of creating a text-based adventure game, I\u2019ve learned a lot of things about living with language decisions that have downstream impacts on aspects of game development that I didn\u2019t know before. I would like to explore this and other dynamics of game development through the lens of project management, project distribution, and other interesting things I\u2019ve learned throughout this process.<\/p>\n","protected":false},"author":13387,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/hathajac\/wp-json\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/hathajac\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/hathajac\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/hathajac\/wp-json\/wp\/v2\/users\/13387"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/hathajac\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":5,"href":"https:\/\/blogs.oregonstate.edu\/hathajac\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":77,"href":"https:\/\/blogs.oregonstate.edu\/hathajac\/wp-json\/wp\/v2\/posts\/68\/revisions\/77"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/hathajac\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/hathajac\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/hathajac\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}