How I created my first Java Project and why I will never finish it.
If I could offer one piece of advice that I have learned through this first month of coding is, pick one project, stick to it and keep building on / with it.
The reason I keep using this project as simple as it might seem is precisely that it is simple. I do not have to worry about planning anything but a random list of words to guess. This way, my focus is then directed at the functionality. To learn how to do different things with it, like a sandbox.
On November 24 & 25 I went to my first Java course ever (any coding course in general). We started with a lingo game. I had NO idea what I was doing but those two intense days helped me understand better what I needed to do to keep on learning. A great piece of advice was to keep trying as long as I enjoy it, no matter how slow the progress might seem.
I worked on selecting the difficulty which means the number of attempts you have to guess the word. This gave me insight into learning how to use correctly the IF/ELSE loops. Applied this as well when you start playing.
I wanted to just get it to run with a big list of words, through a file. Which meant I learned about I/O. The original game consisted of a limited amount of words via Array List.
Also worked on how to restart the game and there was a lot of code cleanup involved while I watched many tutorials on games and loops.
Then I worked on displaying the correct word if you fail, which was harder to do than I thought without requesting a new word.
I had to fix the whole flow as it kept breaking down whenever I added something. So I stopped and redid a flow diagram which helped me a lot with cleaning up again and reorganizing. After I reorganized it I began working on continuing the game (a lot was learned about WHILE loops) and the scoring structure which I began by using again I/O. It took a while for me to understand how it works. Especially when it came to reading integers from it as it will read them as a string and then I needed to convert them back to int to compare scores. Phew. But once I got that working, the real fun began!
More like the end of week 5 as there were holidays in between. I began using the game to practice running databases. I managed to get connected to MySQL, Derby and SQlite. So that was all a success and even though I managed to get it working with Derby, I wanted to understand how to do it with SQlite as I will need this for the next project. So I redid the whole database with SQlite. And let me tell you, the whole compatibility thing is a pain.
But it works! It is functional! 🎉🎉🎉
I want to work little by little on my journal application. But whenever I am stuck I will keep improving this project.
- I want a GUI, I even brainstormed a simple version that I love:
- I want to add multiplayers so to practice log ins and passwords. This way if you login you will see your scores. If someone else does, they will see theirs.
- I want to implement all of this via the browser as a webapp game.
Well, when I look at how it has been only a month, I am amazed at my progress. It is months’ worth of progress mainly because I stuck to my project until I got it to do what I wanted. Every new function required me to rethink the structure. Which meant re-reading and understanding what we did and why. Now, I feel I know what I am doing.
Waiting between job applications meant I could spend around 4 hours a day every day for a month just practicing and looking at different solutions and approaches. The progress will start to slow down next week as I begin my new job. But I will make sure it is still constant progress.
On the next post I will explain how I successfully learned form tutorials without being stuck in tutorial-land. 👍🏻