CodemancerDotCoDotUK

COVID-19, contracted in 2023

Returning from the dreadful trip in Florida, I tested positive for COVID-19 yesterday.

It is my first experience and and here are the day-to-day changes:

To be continued…

Published on January 19, 2023

Returned from Magic Kingdom

I recently returned from a trip to Orlando, and unfortunately, it was not the vacation I had hoped for. The trip was plagued with difficulties from start to finish, and I find myself feeling quite disappointed and sad as I reflect on the experience.

The first setback came when my flight was delayed due to historic FAA computer glitch. This meant ensuing flight change and my bag was dropped at JFK, the connection airport. Not knowing until arriving at Orlando, I requested the bag to be shipped to my hotel, which turned out to be a big mistake.

The next day, I discovered that my camera and lenses had been stolen from my checked luggage. This was a particularly difficult blow to the trip, and not to mention the substantial financial loss.

To make matters even worse, on the last day of my trip, I got sick. This meant that I had to spend my final hours in Orlando feeling ill, which later found to be COVID-19. And of course, the return flight was delayed 3 hours, and I got home around 2AM.

Disney’s parks were eye-opening and Universal Studio felt more of a fun throwback, but overall, this trip was not the relaxing and enjoyable experience I had been looking forward to. Instead, it was filled with setbacks and disappointments.

While it is hard to find any positive side of this experience, I am trying to focus on the lesson learned: things do not always go as planned, and can we just stay home?

Published on January 19, 2023

Radical Uncertainty: What’s Between the Known-unknown and Unknown-unknown

The year 2020 has struck many people that the nature of this world is very uncertainty. Yet, uncertainty is not singular. What’s the weather like tomorrow, who will be the next president of the United States, and what will be the biggest invention in the next century, are questions with varying degree of uncertainty. In fact, they represent the difference between the known-unknown and unknown-unknown.

To be continued…

Published on May 1, 2020

01/2020

It has been long since I wrote monthly summaries. However, this January has been an extraordinary month that is worth noting. If any following month reaches such level of abnormality, it shall be a permanent routine to write down what happens each month.

The first is a dramatic ER visit by ambulance. On Jan 23, in a gym in Century City, I had experienced nausea and threw up, ensuing panic attack rendered me numb and immobile. While waiting for my friend and crouching in the sofa in the lobby, I asked the front desk staff to call paramedics, as I had the premonition that the worst might happen. Then, I had the lifetime experience of being taken to a chair and transported to the ER by an ambulance. I had to wait for the doctor anxiously as the symptoms gradually subsided. In the end, thankfully, I recovered fully in 24 hours. I had similar incidents but that was on a boat, or of food poisoning. What had struck me most was that I still had no idea what caused it this time.

Then, a week later, my car was hit in a parking lot. It was a first, too. While some things are bound to happen sooner or later, it did surprise me they like to occur together. Not the mention that two weeks ago, my online order was found bluntly stolen from the package in front of my door, delivered only 30 minutes ago. Investment was under-performing. Progress on capstone project was lacking…

I felt as January passed, February can pass in a more positive light. One of the changes I have made is, ironically enough, that I picked up my pen (keyboard) again and started writing on this blog. I first finished a post from 4 months ago as I felt the urge to get things done. I also applauded myself for finishing reading a book that took me forever. I went to the gym again, after a respite. Now, I shall do more, and wonderful things will happen.

Published on February 3, 2020

I Went To See An Eye Floater Doctor

People who are close might have noticed, that I like to wear sunglasses even indoors. Most do not know that I suffer from eye floaters. Eye floaters are the lines or dots one could see looking at a bright background.

I have noticed them first in February when I was on vacation in Catalina Island. Since then, I went to see three ophthalmologists. The last one, Dr. Johnson in Irvine, CA was a specialist in this field, known for his laser treatment of eye floaters.

I went to see Dr. Johnson on 9/17. It was an experience worth noting. The meeting was fairly expected, but he gave me some extra information and insights, which is hard to find on the Internet. He spent an hour just talking, and illustrated coagulated proteins in the vitreous cast shadow on the retina, causing the perception of the floaters. After all, it is unknown what has caused the proteins to clump together, and he gave an assumption that the environment factors, like unhealthy diet, could cause the inflammation or unexpected change in the eye.

Making sure that I have all the information I need to know, Dr. Johnson started to inspect my eye. I have been told that most young patients have the floaters too close the retina, an unfavorable condition for laser treatment. The device is the same one that he used to operate with laser. He attached a contact lens-like lens in my eye, between the microscope-like device and my eye. It was not uncomfortable when he did the inspection. It took about 5 minutes for each eye.

Unfortunately, I was not a candidate for the treatment, as my age predicted. Dr. Johnson discussed other treatment options, like vitrectomy, that usually carries too much risk for an otherwise healthy eye. Yet, some people went for it. As the severity of the symptoms are different for each person, and the tolerance of each person differs. More importantly, many people are stuck at the stage to “fix it,” whereas some have obtained acceptance. It is hard to say which stage I am at, because I am still optimistic that it can be treated, or mitigated, and it does not cause me great distress if, in the end, there is nothing that can be done.

Published on September 27, 2019

A Perfect Storm

Santa Clara, Calif – This weekend was fraught of tragedies, as two mass shootings happened in the US within 24 hours, the coming week does not look bright, either. Hong Kong’s protestors are joined by a general strike this week, the first in 60 years; Asia’s financial markets are shaken by China’s central bank allowing Renminbi to devalue to 7 to a dollar, a level last seen in 2008.

It is a perfect storm, as whether today can be the Lehman moment of our generation, it is hard to say. Things are turning day by day, said an analyst on Bloomberg TV today, as Carrie Lam addressed the public. Let’s hope that the worst had already come.

Published on August 4, 2019

PGP Keys

If you have the need to send me a secure e-mail, please follow this guide.

E-mail address: [email protected] (90D66BEA1AEFCA4A)

You can use this key to encrypt and secure our messages.

To start using it, you’ll need to install an OpenPGP software on your computer. Below you’ll find a list of possible solutions for your operating system:

Please import the public key into your local OpenPGP Key-Manager.

1AEFCA4A_public.asc

Published on April 24, 2019

Containerize WordPress and Make It Work With HAProxy

After running for 4 years on a VM, this WordPress blog was migrated to a Docker container yesterday. It was not as smooth as expected because of database, file structure, and load balancer/HTTPS issues. Here are the challenges I got and how I fixed them.

At first I followed this tutorial [link] to move database and static files. But the old server runs PHP 5.4 and MySQL 5.1 which needed immediate upgrade. MySQL 5.7 upgrade was tricky, as mysqld had to be up for mysql_upgrade to fix old database and it turns out to be a catch-22. The fix [link] was to skip grant tables to run mysqld first and upgrade db.

All the db migration turned out to be unnecessary, because there is an All-in-One Migration tool just for that [link]. So here begins my what I really did:

  1. Back up your WordPress with this tool [link].
  2. Set up new container with Docker-compose. You need to forward 80:80 for the first time of setting up WordPress.
  3. Set up a new blog on port 80.
  4. Set up HAProxy.
  5. Update wp-config.php, if your back up file is big, update .htaccess too.
  6. Install All-in-One Migration [link] and restore your back up.
# haproxy.cfg
 global
   tune.ssl.default-dh-param 1024
 defaults
   log 127.0.0.1 local0
   option tcplog
   timeout connect 5000ms
   timeout client 50000ms
   timeout server 50000ms
 frontend http_gateway
   mode http
   bind :80
   redirect scheme https if !{ ssl_fc }
 frontend secure_gateway
   mode http
   bind 0.0.0.0:443 ssl crt your-cert-file.pem 
   http-request set-header X-Forwarded-Proto https if { ssl_fc }
   # content switching based on SNI
   use_backend bk_cert1 if { ssl_fc_sni your-blog.com }
 backend bk_cert1
   mode http
   server srv1 your-container-ip:80
# Add to .htaccess
php_value upload_max_filesize 64M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300
# Add to wp-config.php
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
   $_SERVER['HTTPS'] = 'on';
   $_SERVER['SERVER_PORT'] = 443;
}

Note: X-Forwarded-Proto is required for WordPress to recognize it’s in an HTTPS environment.

Published on February 4, 2019

Learning Angular

Coming from Java background and start coding in JavaScript seriously for the first time, well, not the first if previous work with Express.js counts, I do appreciate the convenience and new concepts Angular gives me. And after all, this simple blog app that shows Markdown format of user post in HTML, and the end of struggle of various errors/bugs are worth celebrating.

Here’s what I did:

Here are the challenges I encountered:

There was a bug that’s nagging me for days, and it’s a simple mistake that providers declaration in a component creates a new service apart from the one in root. So there are two service running in the background. The debugging was painstaking and took two days. And it made me have a deeper understanding of JavaScript reference, and the break of which led me to the finding of the bug.

Published on November 26, 2018

I Ain’t A Gambler

Last 500 days were like a mad train that refuses to ever stop.

Key dates:

11/25/2016 First order to buy 20 shares AMD stocks

05/19/2017 Brokerage account with IB was approved

02/05/2018 The worst performing week ever for me

Apparently, through the up and down of prices, I’ve lost the direction of life. I lost time; I lost money; and I got my first-ever C in college. I get greedy at the top and I suffer from fear at the bottom. Though trading is not the only thing that I regret doing, it turns out to be the culprit of my worsening health and academics. The addictive thought of speculation contributed to some bad decisions I made for my life, as I was ill-prepared for day trading, with an especially bad timing. Nonetheless, I do not hate the market. In fact, it has taught me much: I’ve seen a listed product lose 95% of value in a day; I’ve endured the day when I suffer 300% loss for shorting VIX; and I’ve made thousands out of option trading. However those experiences did not help me become whom I aspire to be: I became a gambler although I knew I ain’t one, not knowing trading was itself a failed financial decision no matter how much I earn out of it.

Despite all, life does not stop here. I have to move on from the mess I created, and it has to be as fast as $XIV drops on the first Monday in February 2018.

Hanwen Zhang

03/06/2018 – SAN DIEGO, Calif

Published on March 6, 2018