DEV Community

drew
drew

Posted on • Updated on

Two Weeks of Java: No Decaf

I've been doing the #100daysOfCode challenge on tweeter, currently 56 days in. About 2 weeks ago (15 days to be exact) I switched from struggling in JavaScript to learning Java. I've been going through Tim Buchalca's "Java Programming Master Class". It's a gigantic course (over 75 hours worth) and covers anything you could possibly think of.

Since switching, I find I've had a much easier time retaining what I'm learning. Part of that is due to the ton of coding challenges, where I actually have to write code. Not code alongs. Each one has taken me anywhere from 30 minutes to 2 hours depending on the difficulty and my grasp of what's happening.

So What have I learned so far?

Programming things I've learned in Java:
writing methods
if/else statements
boolean
the usual math stuff
comparison
casting
overloading methods
a bunch of other stuff.

Not only have I learned it, but I've written 14 exercise challenges. I started the projects, set up a main method, set up a main class and a class for whatever exercise I was doing. All the code was written from scratch, not copy pasted anywhere, or copied while watching a video. For me, this is a big deal, because I'm starting to cross over from someone who needs to watch the video to get anywhere, to someone who can write (at least rudimentary) code.

Some other stuff I learned

I decided early on that I would try to learn "job ready" skills, including uploading files to git. So every time I complete a challenge, that project gets uploaded to git via the terminal. I'd recommend anyone teaching themselves to code do this. There are a ton of tutorials on line that can walk you through how to do this. I've become very familiar with these three commands:

git add
git commit -m "some comment within quotes"
git push origin master

Obviously there's a ton of other commands based on what you're doing. For What I'm doing right now these get me by now that my folder is set up with git.

Breaking everything down into tiny, teeny pieces

When I first started learning coding (and if you watch a lot of Udemy courses like I do) almost never do any of the instructors show breaking something down into tiny chunks.

Instead of writing giant chunks of code and then testing, I just write a tiny bit. In java you can use println() and run your code to print something to the console, to see what's going on, for instance if you're checking true or false on something. Once I started writing a line or two and testing after, things started to click for me.

focus on the learning process

To be honest, I'm still working on this one. During my original attempts to learn how to program, I set what I see now were unrealistic goals for myself. I wanted to switch careers badly (still do!) and pushed myself instead of slowing down and really internalizing the material. I think a lot of people make this mistake, and instead of getting a job quickly they burn out and quit. Or it takes them that much longer because they really didn't write enough code to get semi-decent. This time around, I'm slowing down to (hopefully) speed up.

edit: I'm not saying having goals are bad or anything. Just that realistic goals are better.

Learn how to think(and talk) problems through

When I get stuck on something, its usually because I haven't broken it down enough. Now, I'm not a master of this. I'm two weeks in and just starting to grasp what I need to do. But when I do get stuck inevitably, First I try to make the issue smaller. Then I try to think it through. I usually wind up talking out loud, which really helps me clarify the issue. I'm not sure why this is, but it really helps.

Anyway, this is just some of the stuff I've learned over the last couple weeks. Thanks for reading.

Top comments (2)

Collapse
 
andevr profile image
drew

How are you liking C++? Not sure I'd want to deal with memory management@ but that's just me. Learning to debug properly is definitely on my list of things to learn. Intellij idea catches a ton of errors which is nice. I console log a lot of things as I write code, but I have a lot to learn about debugging in java. Overloading was a strange concept to me, i need to see it in use I think to really grasp it.

 
andevr profile image
drew

Ahh nice. I know with JavaScript there's a way to step through code as it runs. I'm still very new to Java, so don't know much yet. The IDE catches a lot of mistakes though, which is helpful. Its fascinating to me how similar yet different all the languages are.