[This post was originally posted on 01/17/2017, but due to blog migration, it lost its original post date, I’m re-posting it here]
It’s shocking to hear that my uncle (my father’s sister’s husband) passed away today.
I heard the news from my dad. Then I contacted my cousin to condole her. Hours later, she replied:”I have no dad now.”
Reading that single line of message alone broke my heart.
I could hardly image how that hurts.
She’s in tears and cries now.
I just became a father last month, I can hardly imagine how my daughter would feel when I leave her alone.
I regret that I didn’t catch any chances to spread the Good News to my uncle and now I’m praying late that he could still land in Heaven and our godly father will take care of him.
He died at his early 50s, at such a young age, he has a very good wife and a very cute daughter. They’re part of our family.
I didn’t get a chance to see him for the last time.
Death, is so near to us.
This invokes me to reflect a lot. What’s most important to me?
Not work, nor code, nor fixing bugs, not blogging, it’s endless, and in retrospect, it’s meaningless.
I’d like to spend time with my family, just company them. Do whatever with them, time is so precious, I want to be with them.
Maven is a really cool/powerful dependency management tool.
Prior to doing a side project on your own, you could hardly really understand what dependency management really means. I’ve moved my random/vanilla/plain Java code around several times due to machine change, etc. But each time, when I fire up my IDE (Eclipse or IntelliJ), I’m always faced up with a screen of red lines (cannot resolve symbols, etc.) That’s such a pain!
I have migrated my SpringTutorials project into a Maven managed Java project: My Spring 101
This might seem trivial from all perspectives. But to be frank, I would regard it as a milestone for myself. I’ve gone through several different stages with programming, this is a good example of it:
1. “Hello World” stage: Wow! I could make the code run and print out “Hello World” for me, amazing!
2. “Cannot resolve symbol” stage: After adding one API from a non-JRE jar library, my Java code doesn’t compile in my IDE, I’m blocked here, didn’t know/bother what to do to solve it. Thinking whether programmer is a right career choice for me.
3. “Add that jar” stage: After a long time, maybe 1.5 years, after many times people shouted at me, I kind of tried to download the jar and add them onto my classpath. This is a painful process, wondering whether software engineering is a fit for me every single day, just upon I started my career working at one of the FLAG companies. This is a path full of frustration and worry.
4. “Love it” stage: After ruling out other possible diverges, thinking/acknowledged that programming is the best career choice for me, I started to enjoy myself completely in the world of computer science, soon, everything clicks! Maven naturally comes into my mind when I tried to refactor this SpringTutorials project.
This is a placeholder for documenting how I’m going to migrate my site.
After chatting with wordpress online chat, I just realized that wordpress.com is different from wordpress.org
The latter was the one that I was always looking for that allows me to customize my site, here’s the link I’m going to follow.
- Step 1 finished ,purchased a new host (1 year plan) with one of their recommended hosting provider: BlueHost, Good luck to me!
- Step 2: Install WordPress:
- Watched this bluehost installation video
- download FileZilla (open source FTP solution) from here. You could either use your IP address or your domain as the host, fill port number with 21.
- Then I’m stuck at Step 5 of installing WordPress, my BlueHost server returns me 404: I’ve done these:
- upload all the contents of unzipped WordPress to my web server, excluding the directory itself, then try to access this url: https://fishercoder.com/wp-admin/install.php, and it returns me 404.
- Side knowledge: every domain has to be registered with some registrar company, in my case, I purchased my domain through WordPress.com, behind the scenes, my Registrar company is Wild West Domains.
Nameservers are just specialized servers that translate a domain name into an IP address that is understood by computers on the internet.
it turns out that my nameservers are pointing to wordpress.com nameservers, not to the new nameservers that I just purchased on Bluehost, whois.net states that information very clearly!
Stackoverflow doesn’t have very good answers about this topic since it’s too broad.
This article is helpful: http://www.programmerinterview.com/index.php/database-sql/what-is-an-index/
- Basically, without an index, if you’d like to find one certain row(s), you’ll have to do a full table scan, this is literally really inefficient, like human eye check
- An index is a data structure (most commonly a B-tree) that stores the values of a specific column in the table, i.e. in index consists of column values from the table
- Why B-tree?
- This is due to their efficiency: insertion/deletion/lookup can all be done in O(logn) time.
- Another major reason is that the values stored in B-tree can be sorted
- How does Hash table indexes work?
- Imagine that we store one column value as the key in the hashtable, and the row data as the value of the hashtable, the lookup time is very fast. Because basically, Hashtable is like an “associative array”.
- The disadvantages of Hashtable working as index:
- Hashtable keys are not sorted, it only maintains a mapping between key and value, so it’s good for fast lookup, but it’s not good for queries such to find how many employees that are younger than 25 years old in a table.
- Good analogy of database index:
- It’s like the index of a book: if you’d like to find the Chapter describing Python decorators, you could either flip through the pages or just go to the index page where that Chapter is listed, also a page number of that chapter is listed as well. Apparently, using the index page is a lot faster.
- What’s the cost of having a database index?
- It takes up space, the larger your table is, the larger your index is.
- Another performance hit is that whenever you do CRUD to your table, the same operations will have to be done to your index
- As a general rule, an index should only be created, if the data on the indexed column will be queried frequently.