Disclaimer: This guide is intended for RBA 15 Mid-2019 (RZ09–03017EM2).

Image for post
Image for post

Coming from a top-of-the-line 2016 MacBook Pro, I have grown sick of its keyboard and thermal issues. The new 16-inch MacBook Pro is a great improvement but the price tag is way too high for what it is and I need my new laptop to be able to handle AAA gaming and video editing apart from blockchain and cross-platform mobile development. Eventually I settled on a Mid-2019 Razer Blade Advanced 15 with an RTX 2070 Max-Q.

I need macOS to do most of my development and Windows for gaming, yet…

Image for post
Image for post
Source: Harvard University

Bill Gates and Mark Zuckerberg. You know who they are, what they did, and what they built. Why did they drop out of Harvard? After spending two years at USC and now a CS senior with one more year to go before receiving my Master’s degree, I very much approve of the act of dropping out. Here’s why.

Hint: It’s mainly the difference between the theoretical and the practical.

Expectations vs. Reality.

CSCI-104 was one of the first CS classes I took when I transferred to USC. I had a few problems with it. I still do.

CSCI-104 was taught in C++. It was your typical data structures class with an artificially inflated difficulty to both hammer down the basics of programming as well as weed out anyone that couldn’t take the pressure. I’m completely fine with the difficulty of this class but I’m not fine with its promises and grading.

Unresolved Promise

The name of the class, “CSCI-104: Data Structures and Object Oriented Design”, suggests we are also taught how to design programs…

In the beginning of 2020, I decided to start writing about programming on Medium. But after wrapping up the first chapter, I left. Partly because I have zero discipline, but also because once the reader has gone past the nitty-gritty basics, there is a myriad of excellent intro-level tutorials out there. There was no point to reinvent the wheel.

End of excuse.

But when the world needed him most, he vanished.

I am lucky.

A lot of things happened since I last wrote anything on Medium. The SARS-CoV-2 outbreak has caused a complete paradigm shift in the way we interact with each other…

Image for post
Image for post
Read about the differences here!


If you’ve read and coded along every single article in the JAVA-2* series, then congratulations! We now have a fully functional simple calculator that is relatively bulletproof. Despite the seemingly trivially simple logic in our calculator, we have learned and applied many principles in practice:

  • Got started with Java and the powerful IntelliJ IDE
  • Understanding types and variables
  • Asking users for input
  • Making decisions based on conditions
  • Making comparisons
  • Performing calculations
  • Making sense of classes and objects in this Object-Oriented Programming language
  • Extracted repetitive logic into methods that we can reuse
  • Understood the concept of scope
  • A glimpse of recursion…

Last time we talked about prompting the user again if the user has entered a numerical choice that is out of range. However, as we had shown, our simple calculator still hard crashes if the user inputs anything other than a number. Let’s go about fixing that!

Amazon Prime Video and Chill :)

Bonjour madame, I know we’ve just met but let’s Amazon Prime Video and chill at my place tonight :). We can watch three middle-aged men having some chance of falling over and catching fire. You take a shot for every time they fall over and I take a shot for every time they…

Enough talk about concepts, it’s time to get back to our calculator and give it a nice polish. Until now, we built our calculator largely with one assumption: the user won’t make a mistake and enter something they shouldn’t. It isn’t a fair assumption. Just because I personally never make mistakes doesn’t mean other people never make mistakes… Making false assumptions about others is not a good thing to do.

Recall the current behavior of our program when the user enters something they shouldn’t:

if (arithmeticChoice == 1) { result = number1 + number2; } else if (arithmeticChoice == 2)…

We use Scanner in Java to obtain user input. However, not realizing the hidden dangers of Scanner can lead to hours of frustration. Frustrate no more! Because now I will tell you all about it.

Don’t Close Scanner!

When we use Scanner and leave it open, our IDE may complain that we have a resource leak. Even if the IDE does not complain, usually it’s a good idea to close something if we don’t need it anymore. The intuition, then, is to simply close it… Right? Consider the following code snippet:

public class Main { public static void getInput1() { Scanner scanner =…

We just had a baby! Yes, you and I just had a baby! Let’s not get bogged down by who’s the father, who’s the mother, or how we conceived it in the first place as these are just minor details. One of the most important things when it comes to a human being is blood type. The blood type is determined at birth (or maybe when the embryo was developing, but let’s not get bogged down by this minor detail) and never changes throughout someone’s life.

Getters and Setters

If we want to turn all of the above into code, we can start…

Hope the last article wasn’t too difficult! Congratulations if you’ve made it through as the concepts we talked about were some of the most important ones in programming. This time, we will pick up where we left off and explain what “public” means. Before that though, we should talk about the concept of inheritance.

Image for post
Image for post
3 types of inheritance supported in Java. Tutorialspoint


Inheritance is a way to avoid code repetition and specify parent-child relationships between classes. To have a better understanding, let’s take a look at some examples.


Recall the TV class we made a few articles ago. Let’s bring it back:

public class TV { int year…

Jack Boyuan Xu

Making programming accessible to everyone, as it should be. Java, Blockchain, and iOS Teaching Assistant @ USC Viterbi School of Engineering.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store