(07/24)
I'm not exactly used to this blog stuff, so I hope this makes sense. I really just wanted to start this "coding" section off with where my skill level is at with coding, and hopefully having that knowledge will help with those who care to read these blogs.
I started coding in late 2019, when I took my first computer science course in grade 10. I had already known at that time that I wanted to be a programmer, more specifically, a video game developer. Java was the language of choice for this course, and is truly the only reason that Java is my language of choice. I actually find other languages to be quite interesting, despite the fact that I don't really know them that well, obviously aside from html and css. Regardless, it was in this class that I typed out, by hand without shortcuts, my very first program.
public class HelloWorld {
public static void main (String[] args) {
System.out.println("Hello World!")
}
}
Needless to say, I was a pro.
Obviously I've come a long way since then, and I can easily say that programming is way more of a joy than it was then, given that I was completely and utterly confused as to what I was looking at. So as previously mentioned, Java is my language of choice, and is really the only programming language I can code in without completely fumbling around and staying glued to w3schools. With that said, I'm just gonna cut to the chase and start explaining my skill level.
I'm completely familiar with the basics: operators, conditional statements, loops, methods, string manipulation, and even extending out into OOP. I definitely don't have an incredible knowledge of OOP, but I do understand the fundamentals of classes and constructors. I've made programs with multiple objects, but I 100% could know more about them and their functionality. I've also recently started diving into IO and GUI, but I'm far more used to IO. I very recently made a program that makes an html file with your input, which was great practice with IO basics.
import java.io.*;
import java.util.Scanner;
public class HtmlGenerator {
static Scanner reader = new Scanner (System.in);
static File file = new File("index.html");
static FileWriter writer;
public static void main(String[] args) {
//Opens filewriter
try {
writer = new FileWriter(file);
} catch (IOException e) {
System.out.println("An error occurred.");
e.printStackTrace();
}
//Creates index.html file and prints path
try {
if(file.createNewFile()) {
System.out.println("File created: " + file.getAbsolutePath());
}
} catch (IOException e) {
System.out.println("An error occurred");
e.printStackTrace();
}
initialWrite(file, writer);
//Main loop
mainLoop: while(true) {
System.out.println("\nWhat would you like to insert?");
System.out.println("1 -- header \n2 -- paragraph\nq -- quit");
String command = reader.nextLine();
switch(command) {
case("1"):
headerWrite(file, writer);
break;
case("2"):
paraWrite(file, writer);
break;
case("q"):
finishWrite(file, writer);
break mainLoop;
default:
System.out.println("Not a valid command.");
}
}
}
At the moment, it's very basic. It can only take in headers sizes 1-6, and paragraphs. I really only made it for fun and for practice, which is why the readablility is a bit bad. Although perhaps I should always be making the most readable code i can make, even when I'm practicing, just so I have the habit.
Anyway, that just about shows it all off. Most of my coding experience thus far has just simply been hammering down the fundamentals into my brain. Coding has been an incredible learning curve, and it's just so amazing to me that there's always just a monumental amount to learn. I'm at the very beginning of my coding career, and the path ahead seems as daunting as it does invigorating.