Learning Python

I recently started learning Python again, as I’ve had interest in it in the past, but stopped for some reason I don’t really remember. I don’t follow a single source, I make use of videos, books, and random googling for answers. I was following the MIT course I mentioned in an earlier post, Google’s Python class, and two books, “A […]

Hello, World! in Java without main()

While I was reading the SCJP book, I came across the concept of initialization blocks, or init blocks for short. Those blocks of code get executed before any method code is executed. One kind of these blocks is static init blocks, those get executed immediately after the super constructor has finished execution. This made me think, “I could output text […]

Doing some coding

Today, I tried to write code that involves actual problem solving I wrote a method that calculates the factorial of a number, here’s how I did it : [sourcecode language=”java”] public static double calculate(int number){ if (number > 0){ int result = 1; for(int i = 1; i <= number; i++){ result *= i; } return result; } else if(number […]