Front Office Football Central

Front Office Football Central (http://forums.operationsports.com/fofc//index.php)
-   Dynasty Reports (http://forums.operationsports.com/fofc//forumdisplay.php?f=8)
-   -   Another Dev Dynasty: College Football (http://forums.operationsports.com/fofc//showthread.php?t=91710)

GoldenEagle 08-09-2016 10:28 PM

Another Dev Dynasty: College Football
 
Hi all,

Inspired by some of the other programming dynasties that I have been reading on this board, I have decided to start on my own programming dynasty.

My idea is for a college football multi-player web based game. A head coach will 'hire' a staff. There will be 12 to 13 staff members. Together, this staff will game plan, recruit, develop players, and do basically all functions related to a college football program.

My motivation for this is to get better at my job. I work as a senior developer for a Fortune 100 company. But the application that I work on is a really a legacy application. We implement a bunch of poor programming practices because the software was written many years ago and is stable. As a result, my programming skills have stalled over the past four to five years and I have been lazy about keeping them up.

I made the decision to re-commit to getting better at programming. I picked this as my project. Developing a college football game was my original reason for getting into programming back in high school. I don't really have any expectations that this will become a commercial product, but it should help me to keep my skills fresh.

The tech stack that I am using is Java for the back-end and some variation of JavaScript for the front-end. I will probably use a JS framework (either React or Angular make the most sense right now). I evaluated using another JVM language (mostly Kotlin), but the jobs don't seem to be there yet.

I am also going to chronicle some development tips for other developers here. Despite my skills being somewhat stagnant, I still have a natural knack for writing code and designing software. I am also reading a lot of resources to catch up on the latest trends.

The timing of this is sort of weird because football season is about to begin. I like to watch all the NFL games and some college games. As a result, I don't have a lot of free time. Most of the development of this will happen after football season, but I wanted to go ahead and get a start on it.

I hope you will enjoy reading it. If you any suggestions/comments/questions, please let me know.

Groundhog 08-09-2016 10:51 PM

Awesome, definitely following along!

GoldenEagle 08-09-2016 10:54 PM

Oklahoma

Everyone who ever played football at the youth or high skill level will know this drill. It was always the first drill the day that pads went on. The basic idea is that players line-up (usually in-between tackling dummies) and proceed to knock the crap out of each other. The better player will usually win, by either getting a successful block or fighting through the block.

This is the first part of the game that we will build. I am a firm believer in test driven development. Basically, it is a programming technique where you write a test first, make it fail, and then implement the logic to get it to pass. It helps ensure that you have test coverage of your code (which has just a ton of benefits) and makes for an easier design.

In order to get the test to even fail, you have to build out some shell classes. I did this by creating a player class with a strength attribute. This class will eventually be made abstract (or more likely, an interface) and I will instead inherit more specialized player classes from it. But for now, it works for the purpose of creating this test.

I also needed a function to attempt the block. The return type is boolean and it is set to return false. I ran the test by creating two player objects and setting the strength attribute to 100 for one and 50 for the other. I ran the test, which failed. That is what we want.

I then created a very simple algorithm for determining if a block was successful. If player A's strength was stronger than player B, then the block was successful and the method returned true. When I ran the test again, it passed.

Obviously, this will need to be revisited in the future. Strength is just one component of a successful block in football. There is also technique, size of the players involved, and even some randomness (which is really hard to test, but possible). I will need to revisit this in the future and think of a better design. For staters, the attempt block function doesn't belong in the player class.

But it is start. Just like that very first day in practice when you ran the Oklahoma drill over and over again. We have a test in place and can refactor our design. If we break something, our test will tell us.

I probably want get this detailed in the future, but I wanted to stress the importance of TDD and explain my process.

Groundhog 08-10-2016 01:39 AM

I read a book on TDD with Python about 6 months ago. Definitely agree that it seems like the best way to approach coding, especially as the project grows... I just wish I had the discipline for it.

GoldenCrest Games 08-10-2016 07:59 AM

This is going to be amazing!

I'M IN NERD HEAVEN!

GoldenEagle 08-10-2016 10:00 AM

Quote:

Originally Posted by Groundhog (Post 3113644)
I read a book on TDD with Python about 6 months ago. Definitely agree that it seems like the best way to approach coding, especially as the project grows... I just wish I had the discipline for it.


It does require some discipline, but ultimately it makes your code better and more maintainable over the long run. Rushing through code to bust out new features almost always results in code smells.

But I will add that I am not a Python developer. I only really use it as a scripting language. So things could be different.

I thought long and hard about using a Python stack for this project. But there is just not that many Python jobs around here. There is one company that uses that I would love to work for, but there is no guarantee that I would get hired there. That being said, there is a chance I switch tech stacks in the future.

CraigSca 08-12-2016 08:49 AM

Oh good - yet another book and style of programming to learn while I start my own project! :)

GoldenEagle 08-12-2016 02:36 PM

Quote:

Originally Posted by CraigSca (Post 3113977)
Oh good - yet another book and style of programming to learn while I start my own project! :)


Heh. :)

I really think TDD is the way to go, but it does have a bit of learning curve and you have to sort of change the way you think about code. I would pick a TDD book in your language and go from there. Kent Beck wrote a book called TDD By Example that is very good and sort of language neutral if I remember correctly.

I mentioned Kotlin in my original post and this article has me more exciting about trying in the future.

I have also started reading Automating the Boring Stuff with Python. I will use some Python in this project for launching batch programs, etc. I am trying to rewrite all the bash scripts to Python for my regular job.

I watched the preseason games last night and will probably do that for most of the weekend, so I am not sure how much if any coding I will get done. I am also expected a copy of Essential Smart Football today. I want to do some reading of that. I have also bookmarked some more books that I think will help me learn football on a deeper level.


All times are GMT -5. The time now is 06:00 AM.

Powered by vBulletin Version 3.6.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.