Monday, 29 February 2016

Helsinki MOOC - Sout

The tools that University of Helsinki (MOOC) uses are Netbeans IDE, along with TMC (Test My Code). TMC allows for whatever code to be checked against tests from the MOOC. This comes in useful as I noticed my code will always be slightly different to their model solutions.

Week 1 started off simple compared to 'Head First Java'. First few exercises were to do with simple printing. Using the “sout” (Tab) command made typing out ‘System.out.println(“”)’ much easier.
The rest of the week was about primitive time variables and how they are initialised and the values stored in them. Along with a few exercises to do with the Math functions. The week ended on the use of the Java utility called Scanner to allow the user to type into the console and the input used for calculations etc.

One of the exercises I struggled on was when using the % function, which provides the remainder of the division of two numbers; the exercise needed you to output where the user input was even or odd. The solution was that even numbers when halved do not give a remainder (i.e. 8 %  2 == 0).

Week 2 begins with introduction to loops (while(), for())

Saturday, 27 February 2016

Hello World!

I begin my journey with Head First Java (Bert Bates and Kathy Sierra). After reading a few chapters, I can understand why they named it what they did. The start of the book tells you that you should have a somewhat decent understanding of programming, which I don't. Its probably for that reason that I struggled to get through. At some stage in the book, it tells you that you're going to create a battleship game (bearing in mind, I hadn't touched an IDE or written any code yet). I tried my best to push through, but the logic just went over my head.

Even after giving up just a few chapters in, It definitely taught me the very basics of the language. For example, the difference between primitive and reference try variables + how Classes, Methods and statements work together. As well as the general syntax/layout of the code.

However, it was time to find something more friendly, something that didn't move so quickly through the fundumentals.

And so I moved onto a MOOC (Massive Open Online Course) developed by the University of Helsinki.