- Published on
What am I learning recently
- Authors
- Author
- Hang DONG
Index
Think About Language
Recently I've been re-read the book Thinking in Java. I also started to read the documentation of Spring Framework and Java 17 very carefully.
And I got a striking feeling that I've been missing some crucial understanding. Yes, here it comes. About programming language, think about it.
It's a language, and language is used for communicating. In order to use it, I have to know what this language provide, that is to say, know clearly about language's syntax and its API. Otherwise, it would be hard to express myself or describe reality, like losing words. Writing software is communicating with computer. I want the computer to solve problems for me.
So always remind, programming language is language. And what is the essence of language?
- Abstraction Abstraction Abstraction
And, what are the key characteristics of this language? like Java? How do I describe Java in 5 key words?
- Platform-independent
- Object-oriented
- Robust
- Scalable
- Secure
Then explain these characteristics.
My Problems
Now I realized why I got stuck in coding sometimes.
- Not familiar with the syntax and API, so I can't find the right word to say it.
- Not familiar with the best practice, so I don't know how to optimize code.
My Solutions
To solve this, I decided to really dive into the documentation of JDK 17 and Spring. (I should do this everytime. Identify the problem, find the solution, do it, find better way to do it, do it...) Bah bah bah!
In details, the plan is, first get the whole structure of JDK 17 and Spring. Then read the most used part of them. (I hate to check the documentation each time coz I don't remember the most used part by heart. How can this be so hard? It's my problem.) Read, read and carve them into my mind like a circuit board. (write more and more then I shall remember). More specifically, for example, I should recite the most used 10 methods of each API class, like Collections, Map... Know exactly what does these APIs do and when to use them, why use this class not the other class.
Ohh, Iteration!
I've been thinking about iteration recently. For-loop. Small accumulation at each step. After thousands and thousands of iteration. Something great must happen. Singularity. Evolution. Machine. Human. Time Complexity and Space Complexity. Time and Space. Should think often in these two aspects.
Interface
Ghost in the shell is a great manga. There are information everywhere, but people don't have interface to receive it. Think about what kind of information do I want to receive? Then build my interfaces correctly.
Optimize Code
First focus on solve the problem, no matter how dump the way is. Once the problem is solved, think at least 3 steps further about optimization. In terms of Time Complexity and Space Complexity. Don't just stop at 1 step. The reason of doing in this way is that try optimise and solve at the same time often got me confused during the thinking process. Better do one thing at a step. Step by step. Clear.
千里之行,积于跬步。
Like the traditional chinese saying, a journey of a thousand miles is accumulated in small steps.