Java is for cool kids 😎

it’s jennilyn
Jul 20, 2017 · 3 min read

It’s day 3 of language focus at The Iron Yard and I am here to report that Java rocks (for today, at least). I’m loving the structure of this language as well as the challenge of learning OOP.

Stepping backwards into some basics has been refreshing yet hard in its own right. We have gone from building fully-functioning web apps in Node to talking about typing and how to make an array. It’s fun to have your spidey sense kick in with these simpler “the-point-is-the-exercise” activities: This is kind of dumb! There has to be a better way!

What I mean is that we are coding for the sole purpose of learning how things work, instead of programming something that works efficiently. Imagine hiding Granny’s rolling pin, then asking her to make a gluten-free pie. She could probably get you a pie, but it would feel weird with no rolling pin and unfamiliar ingredients.

Since I learned to code in JavaScript, something that’s odd for me in Java is how structured it is. Honestly, it’s crazy and amazing at the same time. Everything is very organized. You have to declare what type your variable is when you declare it. For example, if I want an array items that holds things in my backpack: public String[] items = {"notebooks", "pencils", "snacks"};. Or if I want to count the number of times my class is instantiated: static int numBackpacks;.

Those keywords public and static were intimidating to me at first, too. But it turns out they just define the scope in which the variable or method can be accessed. (And all the JavaScript kids rejoiced.) I know that because my numBackpacks is static it is only accessible in its own scope (object).

Also, the code runs top-to-bottom. Hoisting in the JavaScript sense is not a thing. (All the JS kids rejoiced again. Really — there was applause.)

It reads my mind…

Another part of the Java learning curve is the Integrated Development Environment. You’ve seen fancy software like Photoshop that has tons of functionality, and (unless you know what you’re doing) makes you want to kill your computer. IntelliJ, the IDE we’re using, is like Photoshop except it’s a crazy-cool program for writing Java. It practically writes Java for you. I mean it — yesterday I actually waited for it to finish the name of my new variable, as if it could read my mind.

… except when it doesn’t.

Well that’s enough excitement for tonight. #KeepCoding everyone!

public String niteNite() { return "Goodnight y'all!" };
niteNite()

)

it’s jennilyn

Written by

Proud to be a #WomanInTech. Software developer, lifelong learner, runner, reader, cake-eater. Live bravely.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade