Platform independence is one of the key benefits of Java. We need to understand what platform dependency is, hence, we also need to know what compulsion is. In this post, I will talk about how java programs run from scratch, back to how computers read codes from a high-level view. In addition, I will also talk about the interpreter in Java and what are JVM, Java SE, JDK, and JRE. As a new learner of java programming, it is important to clear the concept out from scratch in order to get on the road to being a good Java engineer.
It has been a while since my previous Mediu update. It was super busy and I was re-thinking which direction should I focus on for the next coming 6 months. Maybe I will write another post later on (around August) to talk about my career pathway before I graduate from the University to my situation right after graduation. Anyway, Java will be my focus for the next 6 months due to some reason to be mention later on. Today, let us talk about the interface in Java.
An interface specifies methods for a particular class that implements the interface must…
In order to stand strong in software engineering, it is important to know about the mechanics of the domain knowledge of the industry. I am currently studying finance knowledge for my work and I will talk about what I knew about the option in general in this post, for the purpose of revising what I have learned.
Before talking about types of options, we have to understand that option is one of the derivatives that based on the value of underlying assets like stocks. …
I have mentioned a few important concepts in my previous post, it is good to go back and read it before directly jump into this post that talks about the issue of using a copy constructor.
There will be a problem when we use a (shallow) copy constructor to allocate dynamic memory in Heap.
Let us imagine we want to create a character for a game and a character has an integer data member of HP, indicating its health. Once the health value reached 0, the character will die and the game is over. The other data member is a…
Before we dig deep into what is a constructor, it is very important to talk about some basic terminology what are their differences. In the post, I will talk about property functions in a class and why do we want to use a constructor.
A Class is talking about the definition of an instance, a Design Blueprint of an object, where it involved data members and its assoicate set of functions.
For example, a class of a rectangle can have data members of an integer length and an integer breadth as its data member. …
I finished reading the Input since my previous post, as well as starting with the new book called Atomic Habits. Before creating any technical post, I think it is interesting to show some critical points of what I found. During the long journey of studying and practicing computer science knowledge and skills respectively, I realize hard-working is an attitude but more importantly, is how smart when you learn a new thing. It plays a very critical point when we want to know how efficient we learn and it seems that hard works are acting like a greedy algorithm, trying to…
When I dig deep into the std::map class, I found there are many areas that I need to talk about such as the Deep copy, the Shallow Copy, Time Complexity of the map class. Let us firstly introduces some basic concepts of maps in this post before digging deep into the related topic when we use a map.
There are 2 ways to insert key-value pairs in std::map. Consider the following code.
I have been using vectors for leet coding all the time. However, I still think that vector is worth talking about and its memory management in C++. Let us talk about the vector template class in C++ and its memory behind it.
The vector class in C++ is like a resizable array, a template class in a standard template library. Consider the following Student class.
I spent quite a time to read deeply on the topic of how to use pragma and the reason why to use a pragma when we write binary files. It seems we dig deep enough to a point that reaching C-level preprocessor. I will talk about what I discovered including some references.
Consider the following code and result.
C++ is not really designed to handle text parsing. It is not the ideal language to manipulate any data input in some aspect. Let us look at the stock price example below, assume we somehow get some stock data from Nasdaq's stock, Facebook, Apple, and Amazon as below.