After choosing to learn Java, I decide to attack it from two angles (this is back in March 2022):
- A hands-on approach from a website called Home and Learn: Java. This gives me step-by-step instructions on how to write code, run it out and learn the fundamentals of programming. It’s very user friendly and pitched perfectly for beginners. In a bid to try and look the part, I install Net Beans and Eclipse Indigo (see Mistake #1), which I use as my development environments. There are so many online resources for learning Java that I am spoilt for choice.
- A more theory based approach using textbooks and online resources, As I plan to sit the Java Oracle Certified Associate (OCA) exam, this will help me cover the theory. I pick up the OCA textbooks and practise question book used from Amazon. I also sign up for Whizlabs for their practise questions and mock exams. Total cost for all of this is £80, which gives me all of the resources I need (apart from time, application and skill). I was really impressed with Whizlabs (great content, brilliant user interface). They offer courses on a wide spectrum of tech qualifications and I would highly recommend using it.
Looking back, I have listed out the realisations and mistakes I made along the way. In all honesty, had I chosen to learn another language (say Python) I think the list would most likely be very similar:
- Realisation #1: My attention to detail is below par. I would describe it as ok (at best). However, to get to grips with the Java syntax I really needed to up my game - the dots, commas, various brackets etc. need a high level of precision that I really lacked at the start and it took months to improve.
- Realisation #2: Getting bogged down eats up too much time. Often I would write code, run code, get error. The sensible approach would be to time box working out what the error is and move on (say five or ten minutes). Instead, I often burn 30 minutes plus go down rabbit holes.
- Realisation #3: The theory I learn is really useful. Getting behind the syntax, understanding why it is written in a specific way and what is happening behind the scenes is where I really learn a lot.
- Realisation #4: Reading code is an art within itself. Being able to read through code snippets, working out what the output will be and if it throws out any errors is a steep learning curve.
- Mistake #1: Using Integrated Development Environments (IDEs) too much. IDEs are coding environments designed to make coding as easy and intuitive as possible. They offer hints, tool tips and shortcuts which help you write error free code quickly. However, as a beginner it is not advisable to use them - this is because to really get to grips with the language, you should write the code in text files and then run them (this reinforces the core principles and really makes you think about what you are doing).
- Mistake #2: Not being organised with my code: In my eagerness to try out new code, I add it into an existing file and hit run. Repeat 20 times and I am left with random code snippets with no context scattered everywhere. Eventually I get into the good habit of having separate files based on specific topics / mini-projects.
- Mistake #3: Not creating standard input data to work with. Using standard input data (such as a list of made up names and addresses) means I can stop creating random input data on the fly when trying out code. It also means I have a better idea of what the code output should be. Creating standard input data at the start and reusing it would have saved me a fair chunk of time.
- Mistake #4: Opting for long learning sessions rather than shorter, more regular sessions. At the start I rejected the idea of just spending twenty minutes per day (before work) on coding practise. In hindsight, this would keep the ball rolling and add to the productivity of the longer sessions.
Looking forward for the next chapters of this adventure. Well done Rob!