MacBook Air 11-inch (Late 2010) revive
Recently, I revived my old laptop HP Pavilion dv3, due to the need of second computer to do my research study.
Since it is revived, and works smoothly, I then revived a tablet which was not used, Samsung Galaxy Tab 10.1 (P7500). I flashed the AOSP 7.1.2 Nougat. And it is revived also. However, the hardware specification is too antique, it can neither install Google Chrome nor Firefox. Most of the apps failed to run. 😩
Bash history for each project
Previously, I tried to use zsh when I am working, so that my default bash history will not be filled with project related commands, especially git commands. Because some of my bash history are useful like ffmpeg related commands. So, I tried to distinct project work and non-project work with zsh and bash, so that they have different shell histories.
However, there are two problems when I use zsh,
- All my projects use the same zsh history. The old history may be lost if I have too many commands (depends on
HISTSIZEvariable). - zsh is slow with
gitauto-completion.
However, zsh has one thing better than bash, that is, auto-completion navigation. Let’s say your directory has various sub-directories, double tab will bring to directory navigation that can be controlled with arrow keys. This is useful for me to navigate to non-alphabetic directories, like the directory with CJK characters.
Rename files according to date
I recently wrote a Perl script, that renames the files in a directory according to the date, in the format “YYYYMMDD ##” where “##” is the running number.
Rationale
Because I used to download the photos using the mobile apps like Weibo or Twitter, however the file names are almost random. This made me hard to organize these photos on my computer.
The artists (or celebrities) usually share a set of their photos, so when I download these photos, the files should have mtime (modified time) in the correct order.
MySQL and PostgreSQL GUI tools
I am using Arch Linux, and recently there are some issues on MySQL Workbench and pgAdmin 4.
MySQL Workbench with the latest version 8.0.12 has issue to make connection through the SSH tunnelling. As a result, I have to downgrade to version 6.3.10. However, with the recent upgrade of icu package to 62.1, it breaks the MySQL Workbench 6.3.10. In order to solve this, I duplicate the following files,
[code lang=text] cp libicudata.so.62 libicudata.so.61 cp libicui18n.so.62 libicui18n.so.61 cp libicuuc.so.62 libicuuc.so.61 [/code]
Catechism and the Pope
I am neither theologian nor bible scholar. But just a Catholic layperson and would like to share my opinions.
The most recent hot issue is the changing of the Catechism about death penalty by Pope Francis. Then throughout the Twitter, I can see there are a lot of debates on this issue, including some people criticising the Pope.
Therefore, in this post, I will share some of my understandings.
Regarding the Catechism of the Catholic Church (CCC), according to USCCB Question 17,
Firefox batch download extension: DownloadSelected
In my previous post, I mentioned about DownThemAll on Firefox 56. Now the latest release of Firefox is version 61, but there is no update of DownThemAll for Firefox Quantum support. Using older unsupported version like Firefox 56 is not a good idea, because there will have no security update. Firefox ESR 52 is slower than Firefox 56 as I have mentioned.
Since I have spare time recently, I spent some days to write a Firefox extension, DownloadSelected, to solve my problem.
Inheritance and composition
The modern JavaScript with the ES6 syntax and the rise of the popularity like ReactJS, functional programming becomes more and more common. When using React, one of the common practice is to use composition instead of inheritance.
Because I started learning programming when the OOP was the most prevailing paradigm, I was trained to solve the problem by using OOP concepts like polymorphoism, inheritance, encapsulation, etc.
I think JS is the most interesting programming language in the modern technology. It supports server-side and client-side development. With the ES6, it supports OOP keywords like class and also using FP (functional programming) syntax like fat arrow (=>).
After reading The Lean Startup
Because I was planning to start a small project, I have developed a prototype. And I asked a friend for some advice and showed the project to him. Then he gave me his opinions, and asked me to read The Lean Startup (Eric Ries, 2011). So, I stopped my project, and start reading the book. This post is about what I get from the book.
(I will write another post for what I have learnt so far.)
Scientific Learning
In my previous post, I wrote about Lean Startup. And I found that it is very interesting that I have come through these things.
- S.M.A.R.T (specific, measurable, actionable, realistic, time-bound) (post)
- Machine Learning - Deep Learning - Convolutional Neural Network (CNN)
- Statistics
- Kaizen (改善法) (post)
- Agile development. Test development development (TDD)
- Research study
When I read The Lean Startup (Ries, 2011), I learn about lean manufacturing. Then only I discovered that kaizen is also part of the lean manufacturing. Wow! I realise that, all of these things are related. And the core of the concept is, “scientific learning”.
Med (Linux Memory Editor) 3.0
Med (Linux Memory Editor) 3.0 released.
Recently I did a great revamp. Remove most of the old code which was not rightly designed. And previously I wrote a ByteManager, which I guess it causes a lot of trouble and crash, together with the memory value locking using multi-threading.
As a result, I spent some times to do a revamp. Remove the ByteManager and use the shared_ptr instead. Because C++ doesn’t have garbage collection. It is hardly for this application to manage the dynamically allocated memory, because the scanned address needs to be hold awhile, or stored for saving, or hold for editing. By using shared_ptr, the memory will be freed automatically when it has no reference.