IntelliJ — First Thoughts

Yesterday was all about IntelliJ, an Integrated Development Environment(IDE) for Java. This is one powerful piece of software. It automatically compiles your files, runs your tests, and offers suggestions. Game changer.

I’m glad I had the opportunity to start my Java journey without it, because I could see it doing most of the work for you. That being said, I’m really excited to be using it now.

It hasn’t come without it’s challenges — it’s a pretty big program, and I haven’t found it to be the most user friendly experience. For example, I was setting up my Hangman game, using gradle. I’m trying to only use the official docs at the moment, so was just using the jetbrains website. There were some things that still took me a bit of trial and error to figure out such as what is the GroupId and ArtifactId. In the end I got it to work!

When I started writing my hangman game, I wanted to make my code a lot more elegant than it was last time. I also really wanted to use the single responsibility principle, and separate my code into different classes. I had originally wanted to do so in my first attempt, but ended up not doing so because I couldn’t figure out how to test different classes. The IDE makes it really easy.

I now have a Game class (which controls the mechanics of the game), a Word class (which controls the word the user guesses), a Lives class (which controls the number of lives remaining), and a Hangman class that is going to be the Command Line Interface.

I’ve been trying to incorporate feedback from my mentors on making methods private where they can be and not testing private methods. My big piece of work today will be TDDing the interface, which is something I’ve had trouble with in both Ruby and JavaScript. I’ve been referred to this blog post which will hopefully be able to help.

I’ve got my IPM tomorrow, so need to get this done today!

Originally published on Jekyll