DEV Community

Cover image for LEARNING PYTHON, GIT AND GIT HUB
Christopher Galvez
Christopher Galvez

Posted on

LEARNING PYTHON, GIT AND GIT HUB

I've always been interested in learning to code, and finally, the opportunity presented itself. After over 2 decades in the construction industry as a general contractor in California, my body told me, 'It's time to do something else.' As a semi-retired person, I searched the web for "remote jobs" when I found Data Annotation Tech. I took the evaluation and was allowed to join the platform to work as a labeler three days later. The work was interesting and enjoyable, especially when I had the opportunity to learn JSON. Learning simple code like that piqued my interest in Python, as everyone on the coding side of the platform kept raving about it. After over a year of working for DAT, I decided to take a course in computer science using Codecademy. This blog is the first I've ever written, providing insight into my first game code, a 2-player TicTacToe Game that anyone can play in the terminal.

The code I originally built was much longer and less efficient than my final code on the main branch. I wrote the code on a branch from my repository named working_branch using GitHub and VScode for my editor and terminal. I'm around 27% complete with the Computer Science course and 45% with the Git & GitHub course. The first step was to instantiate the class TicTacToe. Then, it was necessary to define several objects using the init() method. Booleans were used as well as a while loop to iterate through all the conditions until a player wins or the game is a draw. In the original code on the branch named "working_branch," the code works but is clunky and does not include an exit if the players want to exit the game early, so this final version on the main branch includes that capability. Finally, main was used as an identifier to reference the current file context.

In conclusion, this project was extremely difficult for me and took much longer than it should have; however, I learned an enormous amount quickly. My biggest takeaway from this project is there are many ways to end at the same goal, and coding is more about problem-solving than memorizing every command. I have to learn to think much differently than I am used to and break things down into small, workable tasks. Coding is not easy, and even though I've completed this project, I know I still have much to learn and, more importantly, to understand.

GitHub repository link: https://github.com/cg112358/Tic-Tac-Toe_Game.git

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →