My first Codility test experience

Last week, I received an email from a recruiter who asked me to do Codility assessment. I had to answer three questions within 245 minutes. Although I’ve heard about Codility, this was my first Codility test experience. To be honest, it was really difficult to me.

These questions were not easy to understand, so it took me some time to understand each question. Then I tried to answer the questions by Java or Python programming language. Even though I eventually found the solutions and summited the answers, my average score was not good enough. When I finished this assessment, I was very disappointed with myself. I even thought whether I should keep a programmer job.😂😂😂

It seems that more and more companies like to use Codility assessments to evaluate developers, but I don’t think it is the best way to test a programmer’s coding/programmer abilities.

閱讀更多My first Codility test experience

(Visited 1,569 times, 1 visits today)

[Java] How to use SSL and Google Protobuf on Netty?

Recently, I tried to use Netty framework dealing with message transferring between different virtual machines which are including one server and some clients. Meanwhile, I need to use SSL mutual authentication and Google protobuf when these VMs do communication cross the internet. Although I had already encountered the term “SSL” a lot of times, I soon realised that I had never fully understood how it really works and how it could be implemented in Java.

I would like to share my experience about implementing SSL plus Google Protobuf on Netty. But I wouldn’t exactly tell you what Netty, SSL and Google protobuf are.

閱讀更多[Java] How to use SSL and Google Protobuf on Netty?

(Visited 984 times, 1 visits today)

[Python] Use python boto3 and crontab to backup MySQL to AWS S3

I wrote a python script to backup MySQL and upload to AWS S3. I will show you these steps in the following. First of all, you need to create a user in AWS IAM.

閱讀更多[Python] Use python boto3 and crontab to backup MySQL to AWS S3

(Visited 778 times, 1 visits today)

[Java] Using Jackson and Jersey to parse a JSON file to an List

This example will show you how to convert a JSON file into a JSON String, then parse it to ArrayList. Assuming I hava a timeZoneList.json file:

    "zoneID": "Pacific/Kwajalein",
    "offset": -12,
    "zoneName": "(GMT -12:00) Eniwetok, Kwajalein"
    "zoneID": "Pacific/Midway",
    "offset": -11,
    "zoneName": "(GMT -11:00) Midway Island, Samoa"
    "zoneID": "US/Hawaii",
    "offset": -10,
    "zoneName": "(GMT -10:00) Hawaii"
  .....(more timezone objects)

閱讀更多[Java] Using Jackson and Jersey to parse a JSON file to an List

(Visited 116 times, 1 visits today)

[Ubuntu] Using Amazon RDS with WordPress

In order to improve efficiency and elasticity of EC2 instance, we need to use a database that is installed on a separate machine. A good solution is using AWS RDS. Before we create a database RDS instance, we need to make a dump of the existing database on our WordPress server.

In the following, I will list these instructions.

閱讀更多[Ubuntu] Using Amazon RDS with WordPress

(Visited 98 times, 1 visits today)

[Ubuntu] Install WordPress on AWS EC2 Ubuntu 14.04

I change my blog from google blogger to wordpress recently. First of all, I got an Amazon Web Service account, then I created 2 instances(EC2 and RDS), finally, I installed wordpress on EC2. I will list instructions in the following steps.

1. Create AWS EC2 instance
2. Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 14.04
3. Install WordPress on Ubuntu 14.04
4. Setup FTP server for wordpress
5. (Option) Create AWS RDS instance and connect to WordPress

閱讀更多[Ubuntu] Install WordPress on AWS EC2 Ubuntu 14.04

(Visited 211 times, 1 visits today)

[Java] Converting between Decimal and Binary with Recursion

I am trying to write a program that will convert a binary number into its equivalent decimal number using recursion. Recursion has always been a confusing topic in programming. I write a simple code to implement convert from decimal to binary and from binary to decimal.

閱讀更多[Java] Converting between Decimal and Binary with Recursion

(Visited 24 times, 1 visits today)

[Java] Quick Sort Algorithm

Quick sort is a very fast sort algorithm, which it’s used “divide and conquer strategy” to sort the data. On the average and best case, it has O(n log n) time complexity, on worst case, it has O(n^2) time complexity. And it is unstable sorting.

閱讀更多[Java] Quick Sort Algorithm

(Visited 13 times, 1 visits today)

[Java] Selection Sort Algorithm

Time complexity of Selection Sort Algorithm in best case , worst case and average are all O(n^2) and need O(1) extra space. Selection sort can be implemented in stable sort or not.

閱讀更多[Java] Selection Sort Algorithm

(Visited 20 times, 1 visits today)

【Life】SCWCD: Java Web 應用程式專業認證

經過三週倉促慌亂的準備,總算是以 85%的低分通過了考試。準備考試的期間還要上計算機概論真的是一整個很想撞牆啊 … 閱讀更多【Life】SCWCD: Java Web 應用程式專業認證