Be Brav3

What I Learned From Two Weeks of Intense Coding in Java

September 18, 2017

Recently I was finishing up a team project for a class on Java. It was the most intense coding session I’ve experienced for two weeks. For reasons I won’t get into I ended up doing all the coding for the project. Here’s what I learned.

I Learned a Lot When I Had to Code Everything

In my first Java class I coded a small piece of the overall project. Another more experienced coder lead the team. He created the structure of all the classes and packages. I knew how my own code worked but didn’t understand the overall program. With this new Java project I had to code everything.

Creating a web application via Java without the use of frameworks will be time consuming. In hindsight with the responsibility to code everything I had the opportunity to pick the frameworks I wanted. By using Spring Boot and Hibernate I can quickly prototype a Java web application with a backend database. I can even spin up the web application on my computer with an application server without deep knowledge of server administration.

Through this whole process I learned Spring Boot, Hibernate, H2 database, and Thymeleaf template engine. To make the frameworks, database, and template engine work harmoniously I also learned the process of creating DAO (Data Access Object), services, and controllers. Having to wire all pieces of a fully functioning web application I learned a lot more than just coding an individual piece of the project. Learning to assemble a full stack application gave me a greater understanding why an individual Java classes were coded a certain way.

It’s Difficult to Coordinate a Team Over Long Distances

The Java course for this project is conducted online. After completing the course I can see why majority of companies prefer employees to be onsite. It is very difficult to coordinate among team members that are in different locations. For members of a team to be effective working offsite, they must be highly motivated and love their work. Their project needs to be their primary responsibility. An online Java course taken by people with full time jobs is not going to be the primary responsibility on their day to day priority.

A Class or Course Can Only be an Introduction to Learning

A programming class or course strives to be accessible to many learners. To achieve that goal, they need to set a standard that majority of the students can achieve. A course that’s too difficult won’t get enough students registering. To that end, completing a course only gives me the base level knowledge as all the other students. Learning in the classroom is only the beginning. Mastering the knowledge by building my own applications will take me to the next level.

Learning by Taking Apart, Breaking, Then Fixing Things

To meet the deadline for the class project requires the use of frameworks that will expedite the development process. By being inexperienced with Spring Boot and Hibernate required me to get up to speed on these two frameworks as fast as possible. To accomplish both I needed to model the class project after an existing project using Spring Boot and Hibernate. It just so happens Team Treehouse’s training has three courses on these two Java frameworks. The courses had also uploaded their projects on Github.

Team Treehouse’s courses on Spring and Hibernate created a Giflib application. It had several web pages to add and update categories. Then for each category a user can upload and update a gif file. The categories and gifs are stored in a H2 database.

My class project’s goal was to create a software defect tracking application. Each application tracked in the bug tracker is similar to the categories in the giflib project. And each software defect is similar to the gifs in the giflib project. In the end I ran out of time but did my best to get as much of the defect tracking application working for submission.

What I got out of this intense two weeks was more than just learning Spring Boot and Hibernate. Having to model Java classes for my own project from an existing Github project meant I must clearly understand the existing project’s code. Modifying the code for my own purpose sometimes caused compiler or runtime errors which required fixing code in other classes. This meant understanding classes in other packages is crucial.

I felt I learned more by taking apart another project’s code, modifying it for my own project, and fixing bugs gave me a stronger understanding of algorithms and code structure. To improve as a developer I have to read code written by other developers. Because I was in a time crunch finishing my project for submission I’ve decided to rewrite my Java defect tracking web application. As I go through the steps I will post it on my blog showing my code. I hope the process will benefit others.