When I was writing unit tests for my side project, I found that the foreign key cascade funtionality didn't work as expected.
Read MoreThe purpose of interface is to enable unrelated objects to communicate with each other. In order to communicate, both sides must follow a protocol. Like Lego, in order to put 2 pieces of brick together, you need to make sure they can "communicate" with each other. The bottom one's studs will fit the one on …
Read MoreI was pretty suprised that when I was looking for a git command that can list out all the modified files in git commits that contain certain string. Then I found that there's no such a command out of the box. So I start searching for different commands and put those pieces together.
Read MoreWhen you need to work on remote environment, chances are high that you need to establish an SSH connection. Slow connection speed can be annoying especially you need to do it very often.
Read MoreAfter reading the SSH manual, I enabled the PasswordAuthentication in the /etc/ssh/ssh_config on my server. I tried to establish a SSH connection to my server with the command ssh username@hosturl.com. I got this error message: username@hosturl.com: Permission denied (publickey). Apparently, my ssh client was trying to …
Read MoreHave you ever been in a situation that, you're halfway to complete a feature and interrupted by an urgent ticket? You've modified tons of files and you need to put the modified files somewhere so that you can start working on the urgent ticket.
Read MoreI guess the name SQLite means it's a (relatively) light weight database. All the data will be stored in just one database file. In this case, the backup task would be pretty easy. Basically just copy and paste, then end of story. Why we don't see those temporary files normally? Although it has only one file in the end …
Read MoreThe traditional rollback journal works by writing a copy of the original unchanged database content into a separate rollback journal file and then writing changes directly into the database file. In the event of a crash or rollback, ...
Read More