Showing posts with label twil. Show all posts
Showing posts with label twil. Show all posts

This Week I Learned 2019 - Week 11

Continue from last week or something before that.

What else I've learned this week not within this post? Still continue with the seventh week of ornamental fish culture learning. This week we looked into caring of your fishes in term of feeding and observation; siphon and larval removal. Also the start of discussion on larval rearing of Elacatinus figaro (Barber Goby) and Carassius auratus (Goldfish). The paper of the week is the Siamese fighting fish on the limited researches done scientifically. Concluding the week, HTTP::AnyUA is the Perl module we reviewed this week.

谁是你生命中最特殊的女朋友? 想不到,龙应台都已经67岁了。多年前,曾经读过的《野火集》。 如今,重想起来,仔细内容也不记得了,只有模糊糊的印象,还有少许的情绪。当然,毕竟都有些年纪了,也许是时候重温一下,再重新阅读这书。有些书,是要每年去重读一片,有些书,是要马上丢进垃圾桶。


What is something we usually do but still do it the wrong way? Taking medication at the right time. According to MyHealth portal, the right time to take your medication depends on the daily frequency as shown below. What's surprising that there are medication for 4 dosages per day. Must be quite a challenge to take those medications on time every 6 hours as we have to plan for meal time if the medication is only taken before or after meal.

(1) 1 dosage / day: 8 a.m.
(2) 2 dosages / day: 8 a.m. / 8 p.m.
(3) 3 dosages / day: 6 a.m. / 2 p.m. / 10 p.m.
(4) 4 dosages / day: 6 a.m. / 12 p.m. / 6 p.m. / 12 a.m.

According to MyHealth portal again, another misconception we have is taking medication before meal. It doesn't means that we should take it before we eat our meal. It should be taken 1 hour before meal or 2 hours after meal (Note: The 2 hours is something new). For some medication, 30 minutes before meal. To be on the safe side, 30 minutes before meal. So for medication to be taken before meal for 4 dosages per day, it should be taken at 5:30 a.m., 12 p.m., 5:30 p.m., and 11:30 p.m.

How about the 3 dosages per day? Why the third dosage need to be taken at 10 p.m.? For this schedule, the last dosage was scheduled at 10 p.m. because it's advisable to have a gap of 2 or 3 hours between meal and bedtime.

Again, consult your physician and don't simply read and trust any medical information found online.

Why this is the most strict feeding schedule for Betta sp.? Based on the baby betta care video of Big City Betta channel, we are surprised that the breeder (Amber) have such a strict feeding and water changes schedule (see screenshot below) for the first two weeks.


Compare to most breeders out there, her method in setting up the breeding environment is probably the most elaborate and humane. Typically you just get a container, add aged water and plants, condition the male and female pair, and release the female once the male have build a bubble nest.

This Week I Learned 2019 - Week 10

Last week post or something from the archive posts.

What else I've learned this week not within this post? Continue with the seventh week of ornamental fish culture learning. This week we looked into Zooplankton which consists of Artemia and Copepods; and Moina and Daphina. In addition, we also study artificial and processed feed as well as light intensity, water current, and exchange frequency. Related the paper we reviewed this week is on culturing techniques of Moina. And lastly, Mojo::Util is the Perl module of the week.

"道家弟子對佛像修練...成仙?成佛?"。那瞬间,我既然破功了,笑噴整整半个小时。天啊!《招摇》,这电视神剧居然还拍了整整55集!编剧们,你们幸苦了。可能我们已经有先入为主的看法吧,我们还是真真去看了一集后,结论是,其实不是难看,而是尴尬,不知如何再看下去了。


Should you still customize your GNU/Linux setup? (via HN). 22 years of usage and I still customize from time to time due to necessities or personal delicate preferences . As you get older, you're pretty much just stick to the default Desktop environment settings with some additional GNOME shell extensions. The only heavy customization is still at the console end, exactly like the author's post on customization.

To OO or not to OO in Perl? Is always better to OO as the system grows and it will. Otherwise you will end up with system done in PHP with a bunch of global functions.

What should we use to create textual UI in console? Dialog is the default available option and work with Bash. Off course there are libraries exists for different programming languages.

This Week I Learned 2019 - Week 09

Previous week post or something from the past.

What else I've learned this week not within this post? Going through the seventh week of ornamental fish culture on Phytoplankton, feeding schedule, Infosuria and Rotifier. The review paper of this week is on using fruit fly maggots as an alternative food source for breeding Betta splendens. We also looked into two Perl modules, Carp and Carp::Always.

What is a FrakenPad? (via HN) The nicest thing about Thinkpad lappy is modularity where each computer components are interchangeable in some way of another with minor hack. Till today, many still preferred the classic ideal keyboard layout instead of the island-style keyboard layout even though the focus group study proved the later style is preferable. No doubt, based on the study, tactile and audio feedback is better with island-style, but the new keyboard layout is way better with classic-style. And yet, till today, it still puzzled me why can't Lenovo create a T25 with good screen and hardware specification which leads to the creation of FrakenPad or mods from China? Perhaps it's manufacturing processes or costs? Or maybe it's because of Apple?

Should you ditch your phone? (via HN) No. And you should focus on features that enrich your life instead of making you additive. There are many ways to reduce the addiction, for example, switch your phone screen to grayscale. By doing so, you still retain those smart phone features (e.g. Maps) that you need and at the same time, reduce your phone usage. For those who prefer more constraints but still retain Internet connectivity, the newly released Nokia 210 feature phone is a good choice. Instead of creating intervention on your device, perhaps we should create our own self-constraints, discipline.

为什么传统武术这么弱? 看了《倭寇的踪迹》,现实的武术其实一点都不浪漫,脱离实战。整套电影颠倒了传统武侠片的浪漫情怀,更倾向冷幽默及反思的电影。


What is a Magpie developer? Do you love latest greatest shinny new tech? If yes, then high chances that you're a Magpie developer. And contrary to the article, there is nothing wrong being one. The world is moving fast and attention span is short and expensive. One thing about tech after all these Interweb years, we kept re-discover and re-label existing tech with fancy new names.

How hard is to line breeding your Betta sp.? Hard, especially on certain species. Furthermore, you must obtain good broodstock with quality traits and ensuring the at least four generations. The next challenge we normally faced is the broodstock won't breed, even though both fishes were healthy and well-conditioned. The obtain pure quality traits, you must ensure the broodstock still alive during these periods (2 till 3 years) to breed again with the next generation fishes.

What is something no one really tells you about getting older? Focus right, eat correctly, and sleep well.

This Week I Learned 2019 - Week 06

Last week post or you can going through some earlier stuff.

Happy new year again or rather, happy Chinese New Year. The weather was blazing hot compare to all the previous year even though there is no fire haze from our neighbouring country.

What else I've learned this week not within this post? Going through the sixth week of ornamental fish culture on fish breeding techniques such as selective breeding and biotechnology. Since this is a short lecture notes, I've decided to continue with week 7 study notes which discuss on seed production on factors affecting larvae rearing and feeding (species and water medium). The review paper of this week is the masculinization of the ornamental Siamese fighting fish with oral hormonal administration. SMS::ClickSend is the Perl module of the week to be reviewed.

Is Nokia 6303c still available these days? The most memorable and funny post I've read so far this year. I'm not sure under what context the poster needs to use a durable normal dump phone, but moving from Nokia 6303c, Nokia 216, Nokia 150, and lastly CAT B30 His perseverance is commendable and definitely should be the coolest post (not coolest use) of Perl usage writeup. I miss the old monochrome dumb or feature phone which is durable, have long lasting battery, and purposeful usages (call, text, and defend). Does affordable dumb phones still exists (as in 2019) these days? Yes, there are quite a lot and the one that caught my attention are from Alcaltel model 10.54, 20.08, 20.51, 10.50. Why dump phone still have a market these days? Four words. Africa and senior citizen.

为何程序员找工作要有个黑名单?这是Github每星期的邮件里推荐的一个流行的Repo。看见这个Repo竟然有十多千个Star,没想到还蛮多大陆的同胞在使用Github。

What are the differences among the subroutines in Carp module? Carp is a Perl module that provides alternative subtitutions to to `warn` and `die` in Perl? The screenshot below summarizes it the best. If you want the similar backtrace feature but don't or can't change your Perl code, there is always a Carp::Always module that will patch the `warn` and `die` subroutine.


What does a long time developer want? "Build more long lasting artifacts." How? Contribute more to FOSS then, is as simple as that.

Is Makefile redundant? In some context, yes. Because if you've a shell available, any shell scripts should be sufficient enough to emulate a Makefile as shown below.
#!/bin/sh
    set -e

    case "$1" in
        up)
            docker-compose up -d
            ;;

        build)
            docker-compose rm -vsf
            docker-compose down -v --remove-orphans
            docker-compose build
            docker-compose up -d
            ;;
        *)
            echo "unknown verb: $1"
            ;;
    esac

Write and publish a book in ten minutes per day? (via HN) Is this doable? Yes, you can just sit there and stare at it for ten minutes. However, the ten minutes is just the appetizer, to get your started. Maybe you can be in the zone or maybe not but you did something, even through you're just sitting there. The thing is you must do it every day, and every day it get easier. Remember the Jogging Baboon?

However, your brain still works on the task subconsciously even after the time frame. If you're not writing a book, what else can you do in ten minutes per day then? Doubt so as you brain still process the task the whole day even after the timed duration. Hence, the ten minutes is just to bootstrap the task and you've spend a few hours later doing it subconsciously.

There is another important lesson here. When to stop. If you don't have any juice left, stop. Or if you doing very well like in the zone, stop so you can look forward to continue tomorrow.

What else can you do during the ten minutes duration? There are plenty of things such as writing a dairy journals (via Lobsters), pick up any new habits, 5BX exercise plan, core wars kata.

This Week I Learned 2019 - Week 05

Last week post or something else instead.

What else I've learned this week not within this post? Going through the fifth week of ornamental fish culture on fish breeding specifically in live bearer; eggs scatterer and eggs depositor; bubble­‐nest builder and mouth‐brooder. The review paper of this week is the study of effects of photoperiod on reproduction of Siamese fighting fish, Betta splendensThe week was concluded with a Perl module review of API::Google.

How do you pick the best traits to breed Betta sp? If you watch the video below, typically it will take a few generations (if you're lucky) to obtain the good traits to develop a good line. How long? Roughly 4 generations which is around 2 to three years, provided that these broodstock reach maturity around 6 months and you've a quality traits to choose from.



Which show has the best NBA commentary? The Jump, the weekday daily discussion and debate show in ESPN on NBA. Compare to other NBA commentary shows, Rachel Nichols did a wonderful job setting the pace and keep the discussion going on. Commentary was always to the point and the viewer can always learn something new from the guests. Tracy McGrady and Jackie MacMullan combo was great with healthy debate.


How to improve your Bash-fu? Do everything in pure Bash. The main issue with shell script or terminal is we have too many choices and too many legacy baggages. Does having a software monoculture solve the issue with decision fatigue? Yeah, in some ways. I've been using Zsh for a while and there are some quirks that need some times to adapt to.

How to be successful? (via HN) Always debatable and subjective as certain things can be measurable (financially) or not (relationship). Perhaps when you have enough and be content, "moderation in all things." Or being healthy in term of physically and mentally. Maybe you can do what ever you want to do? Why not just read the opposite, advices from people who are not successful instead? When comes to advices, be careful of the survival bias. Maybe there is no such thing as success, a donkey is successful as a donkey.


Maybe reading through what people say before they die? (via HN) will let us reevaluate our definition of success. Nevertheless, this quote caught my attention when come to your own career. However, if you still love what you're doing after so many years, effectiveness is just the side effect.
"You don't want to be in a career where people who have been doing it for two years can be as effective as people who have been doing it for twenty—your rate of learning should always be high."



This Week I Learned 2019 - Week 04

Last week post or something else from the past.

What else I've learned this week not within this post? Going through the fourth week of ornamental fish culture on nutrition for ornamental fishes on live and formulated feeds. Different nutrients of protein and amino acids; lipids and fatty acidscarbohydrates and minerals; and vitamins and carotenoids were discussed. Meanwhile, this week paper for literature review looked into the optimal crude protein level for feeding juvenile Betta fish. The week was concluded with a review of Reply module, a REPL tool for Perl.

Is what we read on Internet written by insane people? (via HN) Discussions in any communities either physical or virtual are driven by selected outspoken few, off course, with their own agendas, either paid or not.

Stuck and don't know what to do next? Write things down (via HN), question until you reach an obvious answer on what to do next. Writing as well as programing is a creative endeavour, occasionally, you will get stuck, be it a writer block or code block. Don't feels like writing, talk to your rubber duck aka Rubber Duck method. Explain the problem to yourself, part by part or line by line.

Relatedly, how do you organize/track your personal goals? Always analogue way, just pen and paper. Nothing can beat the old fashioned writing it down and make it happen. Subconsciously our mind will keep us in check of what we've written down.

Is modern PHP (via HN) still relevant for web development? Yes, and very much very relevant. Yes, it's not as fancy as other programming language, but it have came a long way. Laravel (with all the side projects), even though will all the magics behind it, is as good or surpass Ruby on Rails or Django. Needs asynchronous programming framework or coroutine like Node.js or Golang? Well, you can check out Swoole. Furthermore, the language is simple enough for beginner to pick up and finding or train talents using PHP is way more easier within the local MY tech scene. But off course, some people don't use it because PHP is not the shinny new toy anymore, lacking the sexy factor. Nevertheless, for a simple and pragmatic web development stack, nothing so far can beat PHP. If you're venturing into PHP, read through both the right way and the wrong way.

How do you find text in database with HeidiSQL? "Just press Ctrl+Shift+F to call the "table tools" dialog."

Should you replace Facebook with email? (via HN) Yes, if you're going old school. Nevertheless, one thing I agree with with the writer, emailing leads to more intimate and better conversations.

How to teach Git? (via HN) The best written explanation with good visualization of any Git tutorial I've read so far.

This Week I Learned 2019 - Week 03

Last week post or something else instead.

What else I learned this week in separate posts? The third week of ornamental fish culture MOOC on quality characteristics determination on GoldfishKoi and DiscusAngelfish and schooling fish. Continue with literature review on paper of feeding frequency effects on Betta fish growth and fecundity. The week was concluded with a review of MP3::Daemon Perl's module.

What is the best written comment I've read this year? Motivation and willpower is not sustainable compare to just chop wood and carry water. Just do things (as quoted below), one step (or 5 minutes) at a time. However, do check for any health issues. Be kind to yourself. Move, sleep, and eat well.
One day, you will be dead. Each year that passes after your death, fewer and fewer people will remember who you were, what you did or what your face looked like. Eventually, you'll be completely forgotten. Who cares if that side project you put out sucked or not. Might as well put it out there and see what people think. There's a good chance too that the project won't even be remembered even by the time you die.
The best way to get experience is to do things, so given that no one is going to remember, might as well try to do it. Your successes won't be remembered along with your failures.
Should you dump unwanted pet fish into the river? Definitely no. The Amazon sailfin catfish (also known locally as DBKL fish), which is not an indigenous species, have invade our local rivers, ponds, or lakes. The bigger issue is that most people don't know or don't want to euthanize (humanely dispose) of unwanted pet fishes but revert to aquarium dumping instead. Perhaps, sell back these fishes to fish stores or donate to other hobbyist. If all these fail, just use Clove oil.

How does fish farm in SG looks like? Let Ah Hua tells you.



How to breed shrimp? The most important lesson from the video is not about breeding shrimp, but understanding water parameters and maintaining good water quality. Rare we stumbled upon good video in YouTube on breeding fish.



Is luck real? Not really, is only one of many external factors in life as in what they say, "lucks favour the prepared mind". Choose personal empowerment (focus on who you are, choose your own race, and love what you do). Accept those ideas that growth you and reject those which drag you down.

How do you organize everything you want to do? Regardless what system you've implemented, the system should be simple and easy for constant repeated review. Complex system discourage usage and reviewing. Without reviewing, there will be no awareness on the progress on your to-do list, hence stagnance of what you've planned to do.

If not SICP, then what? Maybe HTDP? (via HN) The endless argument on why SICP is not the right entry material for those who want to venture into computer science or software engineering and HTDP is probably a better choice instead.

This Week I Learned 2019 - Week 02

Last week post or going back for old stuff instead.

What else I learned this week in separate posts? First, continue with ornamental fish culture through MOOC on body profiles and spawning behaviours, famous species, primitive or Jurassic fishes, and Goldfish. Second, the literature review of the paper on minimal water volume for intensively producing male Siamese fighting fish. And lastly, Module::CoreList is our Perl Module(s) of the Week (plMOTW).

How Photography Is Affecting Our Brains? Due to distance, camera angle, and distortion, taking selfie (around 1 foot) makes your nasal base seemed 30% larger compare to selfie taken at 5 feets away. How about normal photos? While photos can be a good memory preservation, taking and sharing photos for social medias will lead to "self presentational concern or anxiety". Instead of engaging current moment while photographing, you're being distracted. If you still need to share and want to fully enjoy the moment, delay sharing instantly just like the old way of photographing. The professional and amateur photographer comparison test was predictable. Professional composes while amateur looks. Technology advancement changed how we take photos. We don't look and feel the subject but instead through the screen of our equipment instead.

"理解只是使誤解的偏差小了一點?" 看了几遍都不明白,读了评语后,才逐渐了解。

Is it possible to produce 100 grams of garbage each month? Yes, to live with a zero-waste life, you and your partner in crime need to be discipline, have access to cheap locally produced natural food, and living away from busy city.

Why you should join the analog social media? Part of the digital minimalism movement. Just use digital and Internet for essential tasks (works, writing, calendar, map, and others). Join a photowalk walk and have a good discussion on photography, life, or event itself. No need to upload, post, and share the photos.

This Week I Learned 2019 - Week 01

Happy new year 2019! Another year, another new TWIL post.

For those who miss out the previous post of the series, check out the last TWIL post of previous year or the whole year review. As usual, go through some legacy TWIL posts as well.

What else I learned this week in separate posts? First, ornamental fish culture in terms of overview, industry, popular tropical fish species through our local online MOOC. Second, the literature review of the paper on the effect of salinity and diet on Betta fish growth and survival. And lastly, the start of Perl Module(s) of the Week (plMOTW) series which we review the Data::Money Perl's module.

What is a mental model? According to Wikipedia, mental model "is an explanation of someone's thought process about how something works in the real world." In other words, a mental model is a systematic thought process that helps you to make better decisions. There are several list of mental model catalogues, Gabriel Weinberg's list (for Anki as well), Kent Beck's list, Slava Akhmechet's list, and Farnam Street's list. Similarly, there are cognitive tricks or  "brain hacks" that you can use on daily basis to manage your life. Contrary, the discussion on these "brain hack" is more philosophical rather than systematic to approach any issues. Nevertheless, good mental exercises for anyone, especially those on writing which I should adhere strictly. This reminded me of a research on when is the best time to write.

What is the morning writing effect? (via HN) Discussion and research on what is the best optimum hours to write. Not surprising, morning is the preferable schedule but because for those who were interviewed, they worked as a full time writer or writing is a major part of their works. Hence starting to work or write in the morning is obviously answer. Discussion at Reddit seemed to have different opinions. For those who have a day job and write casually, night time is the most suitable hours, where everything have slow and quiet down. The discussion on best hours to write relates to our sleep hours and quality.

What is circadian rhythms? It's our internal biological clock responses corresponding to external environment factors like light, temperature, and others. Your health and productivity will be affected if there are any disturbances in your circadian rhythm, for examples, jet lag or blue LEDs light (mobile phone or PC) which affects our sleep (secretion of melatonin hormone which regulates circadian rhythms) leading to drowsiness. To achieve good health and improve our quality of life, not only we need to eat well and exercise adequately, we also need to sleep satisfactory. Does fishes have circadian rhythms? Not really but there was a research suggesting that fishes may have.

2018 Year In Review

As today is the last day of year 2018, this is the time to reflect what I've written for the past year again, something that I've done since 2017, 2016, 2015 (when I first started the This Week I learned (TWIL) posts), 2014 (not sure what happen, can't find anything), and 2013. As I re-read all previous posts throughout this year, it dawned to me that my perception of time was way off. There were certain events which I thought were written down in June but occurred in January instead. Worse, there were certain posts that I questioned myself, "Wait, did I wrote that?". Nevertheless, thinking in writing is a good way to explore your thoughts for the past 365 days.

Some quick summary of each month for the whole year.

January. Betta fish breeding methods, logs, market pricing, and diseases handling. Career planning relatively to your age and what you should be doing for this year, the usual new year resolutions crap. Some thoughts on movie and passing of a famous illustrator. Revisit walking steps counting and appreciation of Chinese writing (I should do this more this year). Guitar duet is fun, only if you have a partner in crime. Also, some passing rant about front end development. Do revisit the CrushEntropy and Open Aquarium.

February. Technology stuff, the never ending quirkiness in MySQL, Git, and Perl. More walking steps counting. Again, Betta fish breeding in relation to Sturgeon's Law, floating plants, Dropsy diseases and Epsom Salt. Containers hype and the usual hype cycle in tech world repeats itself again every year. Watched the best NBA play move of the year (IMHO). Do reread and understand that productivity is not learning.

March. Lots of Betta fish breeding projects and lighting issue in relation to algae boom. Relearning Chinese and reusing English words I've learned each week in writing. Using the right medication cured some really old wounds. The perils and irony of applying project management technique in reality.

April. Even more Betta fish breeding project, diet (its stomach size is as big as one tiny pellet), types, and history. Some history on React and best way to understand React is to build it from scratch. GDPR going to be enforced soon. The usual quirkiness in Git, Perl and MySQL.  Appreciation for Chinese poem and more English words learning. Ubuntu upgraded to 18.04. Things to follow up, do blood pressure reading for both arms and measure the differences and don't waste your 25000 mornings.

May. More Betta fish breeding projects. Learned more HTTP protocol and rediscovered some Perl (with Travis CI), MySQL, and Docker stuff. Look into FORMS again.

June. What happened this month? Writing style changed to Q&A type. Is your SO still breeding Betta fish? Yes, she is. I heard you're still doing Perl? Yeah, exploring Moo, AUTOLOAD, overloading, map, eval, and dispatching. The aftermath of GDPR implementation. Revisit JANKI method and a critical component.

July. Exploring other fishes like Zebra fish and Anabas. Derived a Betta growth table so we can make sure we're feeding the fishes adequately. More discussion on Betta fish colour type and aquarium tropical fish diseases. Computer hardware stuff. On the artsy side, movies and music. And lastly, the usual MySQL rants and React. Follow up with UCLA's Guided Meditations audio tracks; and chop wood and carry waters.

August. Continue back Betta breeding project and learned about wild Bettas. Revisit audio stuff but nothing done yet to the setup. Meal prep, my friend, meal prep. Books and more books. The Fn + Space key combination blew my mind away. Most important things regarding time, Temporal Illusion, Telescoping Effect, and Chronostasis. Ask yourself, have you figure things out yet?

September. Different strategies in reading book, three books at a time, hard, medium, and easy level. Reading experience will be further improved by active reading. Focus on strength training instead of cardio workout as building muscle burns more fat. Something about BPA and plastic containers. Something else about TypeScript, Perl, and MySQL, Git, and Ubuntu's Snap. Do start reading with pencil. Also, stop treading water, learning to learn.

October. Another Betta breeding project. Home ownership (buy or rent) and property in MY, just hold and wait. Perl's constant, my goodness. Lots of front end stuff that a developer should knows.

November. Going analogue (reading, writing, meditating, sleeping, or cooking) is probably the best thing ever happened to this fast paced life. The fundamental is always important, learn your kick timing in swimming. Ubuntu upgraded to 18.10. Study liberal arts may be better instead of STEM. Found an anime worth watching and also stumbled upon an anime that I wish I can unwatch, for humanity sake, seriously, that was so effed up.

December. Breeding Betta again. Blogging marathon, cleared up all pending blog posts from the past. Windows as a development platform (Babun, Zsh, or Scoop) still quite a lot to be desired except maybe VSCode is faster and fluid compare to GNU/Linux. Revisited LXD and MySQL. Finished up one pending Coursera's course. Make sure your insurance policy is "guarantee renewable". Long awaited news, the death of Internet Explorer, good way to conclude the year. Be content and learn to live with less, good to fit into one bag.

That was a quick summary of each month blogging posts. Now we will continue with the details reflection on projects that occurred this year.

Betta fish breeding project. We have started roughly 40-plus projects but only 27 Betta pairs managed to mate. Out of those 27, 17 was considered as successful, 3 were partially successful (the male or female Betta succumbed to illness after we removed it from the breeding tank), and 10 were failures as the whole population was wiped out. The good news is, some of the Betta fishes from our first successful breeding project, BSL20171231, were still alive and healthy. The most successfully project was BSL20180518, where we obtained quite a few good Super Red male. Solid colour Betta was far more easy to breed in term of colourization compared to Koi or Marble. Unfortunately, no female Betta were found for us so we can continue our second generation breeding project (more on this in coming post about Betta fish genetics).

Reading (books or research papers). 10-plus books and scientific literature. Nothing much and this can / should be improved for this coming year. Research papers are more fun to read than books, although some really needs time to digest the content especially you're unfamiliar with the domain.

Writing. 109 blog posts this year, 32 more posts than last year. As I realized, put aside grammar and spelling, if you have something to say, you can always write something up. I'm very well aware of where I'm lacking when come to writing. What remains is tuning my writing process (ritual, word choices, editing, and environment). Nevertheless, TWIL will proceed as usual. And for the writing strategy, still the same, striving for quantity over quality but on different topics instead of technical stuff.

Learning (MOOC courses or something else). TypeScript, React (yet another framework and another abstraction over HTML), and more Perl, especially writing CPAN modules. Managed to finish one online courses (long pending) this year (it was fun). Will continue with other online courses, not really into STEM but more towards liberal arts subjects. Sadly, I didn't have time and motivation to look into the embedded stuff.

Health. Supposed to be walk or move more but a changed of plan in the second part of the year. Rigorous swimming training, consistent meal time (especially dinner and thanks to meal preps), healthy food (more vegetables and fruits, and almost no processed and sugary food and drinks), and adequate sleep. The combination of all theses leads to planned weight loss (1kg per month) where my weight almost reached the safe range of healthy BMI and I've lost two inches of my waist. Focus on strength training instead of cardio workouts as muscle burns more calories. Long term plan is to age slowly and gracefully.

FOSS contributions. Four Perl's modules. Can be better and nevertheless, is a start somehow compare to all those years. Will continue this as usual.

This Week I Learned 2018 - Week 52

Last week post or every damn thing from the past. As this is the last week of year 2018, this will be the last second post of this year before the reflection post at the eve of the new year.

What is the plural of fry (a group of little fish)? Is fries, as in like french fries. Every time when I jotted down my observation note on Betta fish breeding, I always confuse about the grammar.

The use of carcinogenic pesticides in our local rice, will this ever get regulated and monitored? Doubt so but our neighbour country, SG will surely let us know. While pesticide residues found in our food sources (especially beloved chili) and diet is still worrisome, there is still lack of conclusive evident linking pesticides to cancer.

Who is Larry Wall and how he is like? The creator of Perl programming language, the author of "The Three Virtues of a programmer", whose favourite colour is Chartreuse, an INFP, and unassuming. Also, some said he is Weird Al in disguise..

How to Get Things Done When You Don't Feel Like It? Use and apply these five strategies: (1) Gamify your process. Start with the smallest possible step that you don't have any excuses not to start. (2) Reserve calendar time for every project. Mark it in the calendar as any other important items in your life. Allocated a short period to do your next smallest item. (3) Get other people involved. Accountability is the key here. We will likely follow through what we promise others. Example is the daily scrum. (4) Talk about it. Externalizing problems by venting it out. (5) Practice the art of "precrastination". Do something else satisfying that release "dopamine" like checking off a to-do list or a short break.

This Week I Learned 2018 - Week 51

Last week post or something else from the past years.

Are we at the end of hardware virtualization performance? Yes, according to the trend of the Amazon EC2 Virtualization Types. However, in the end, we just go back to bare metal somehow. The rapid improvement in virtualization made setting up homelab and data hoarding possible, cheap, and fast.

Meanwhile, what the heck is Firecracker (official announcement from Amazon)? New virtualization tool based on Kernel-based Virtual Machine (KVM). Interestingly, checking its Git repo indicates that the project was written in Rust, due to its origin started from Chrome OS Virtual Machine Monitor (crosvm), which was written in Rust. Why? Serverless platform, and for Amazon, the removal of VM like Fargate which leads to further cost reduction. Similar, Nitro, the Amazon latest hypervisor, also leverages on KVM but only the core modules to achieve near bare metal performance.

How do you automatically clean up orphaned Docker containers, instances, volumes, networks, or images? If you use Docker for your daily development, your environment accumulates these leftover artifacts unless you're diligent enough to do the clean up yourself. My "research" (ahem, googling) found two tools, docker-gc and docker-clean. The former is written in Golang and thus make it more portable compare to the later in Bash. But why such feature is not built into Docker itself?

What the heck is MVC-L? A concept popularized by OpenCart. Nothing fancy, just an additional Language (L) layer added to the pattern. Combine with another existing extension pattern to MVC, HMVC, we will have HMVCL. Is software pattern still a thing these days?

Is being an independent ISP still a thing in 2018? Yes, it still is, especially in rural area. Whole infrastructure is based on Ubiquiti and Microtik hardware.

How to update parent state from child component in React? Callback in the parent component as a prop to the child component. Treat each component as a class and props as parameters passed to the instance of the class itself. The basis concept is quite straight forward and what was I thinking?

In the parent component.
render() {
    return <Child action={this.handler} />
}

In the child component.
render() {
    return <Button onClick={this.props.action} />
}

This Week I Learned 2018 - Week 50

Last week post or something else from the past instead.

What is the one crucial thing when buying insurance? Make sure it's guaranteed renewable. If not, after a big claim, the said issue will be exclude from your policy upon your renewal. If you have an insurance policy but not guarantee renewable, make it has unlimited coverage. Read the Bank Negara Malaysia (BNM)'s guidelines on this. Meanwhile, something related, when comes to insurance claims, you can claim from multiple insurer for Personal Accident (PA) or life. For medical, only can claim from one insurer.

Do we need to push so hard for Science, Technology, Engineering and Mathematics (STEM) education among young people? Yes and no. Yes, if we want to stay competitive in this industry. No, this will create oversupply of labour and thus wages are kept low. Thus, does not really justify for young people to go into STEM industry where wages are too low and education fee was too high for those looking for good university.

What are the best books of 2018? (via HN and Reddit) Well, you can go through the list from NPRGoodreads, The New Yorker, Science Friday, The Wall Street Journal (politics, children, science fiction, and mysteries), Esquire, Amazon Best Sellers or by category (note best seller), The Guardian, Powell, Five Books (science, fiction, and politics), Library Journal, People, Mental Floss, Indigo, Bill Gates himself (summer and winter), Barnes & Noble, Book Page, Financial Times, History Today, Space  (old and new), Smithsonian (history, science, travel, food, and children), and AV Club. There is one book that caught my attention and found in most of the recommended lists, Madeline Miller's Circe. If you don't have a good material to read for the new year, just check the best books of last year.

What happened when bad water quality and monsoon month (December) meet? Twenty dead fishes. Similar thing happened last year around December where some Betta fishes were dying in mass. Is it water hardness, pH level, ammonia level, nitrite level, or diseases? Our conclusion with  some googling suggested that all possible reason. Drastic water change (like 100%) during raining season will shock the fishes leading to low immune system. Furthermore, irregular water changes increases the possibility of ammonia poisoning overfeed without removing the remains will lead to nitrite poisoning.

One obvious symptom was group of Betta fishes cuddle together at the corner at the tank (see photo below). Last year, the same thing happened to our female sorority tank and we thought because these fishes were "bonding". Our naivety caused the total wipeout of all the female Bettas.


How do you troubleshoot DHCP issue within a container? Use tcpdump. `lxdbr0` is the default bridge network adapter used by LXD.
sudo tcpdump -ni lxdbr0 port 67

This Week I Learned 2018 - Week 49

Last week post or some old posts.

How to identify and utilize the hidden pocket time available? Surprisingly, there are 13 time slots available. Generally, how do we to shed unnecessary time off your daily schedule, for examples, choosing what to wear or 40 minutes per day on buying stuff? Planning, automation, and limit the choices you've to make. Plan your week ahead, preps your meals up front, or wear the same type of clothing everyday. All these to prevent decision fatigue by removing yourself to make unnecessary decisions in your daily life.

What are you thankful for? I share the same sentiment with this person. Of course, personally, be content.

Does quitting social medias like Instagram or Facebook make you happier? (via HN) Indeed, as the author experienced, it will make your lighter and thus happier. I believe the same experience you felt when going for vegetarian food for a period, your stomach felt lighter. As usual, moderation is the key but take note, these apps were explicitly designed to "consume" you. Start slowly. Instead of drastic changes, disconnect yourself during the weekend, then weekday, and finally totally remove yourself from it.

How does one living with less? Fit everything you own into one carry-on bag. As usual, there always a subreddit, r/onebag, exists. If you travel a lot for a long period of time, the author list of items is a good way to start or reduce the "stuff" you owned to the essential bare minimum.

How smooth jazz took over the '90s? When you mix the technicality of Jazz and melodically of Pop music, then you have Smooth Jazz.

Is Microsoft Edge (Spartan render engine) or Internet Explorer (Trident render engine) going to be replaced by Microsoft own version of Chromium? Yes and finally bloody yes. (via HN) The demise of Edge/IE browser allows me to check off an item from my to-do item after so many, many years of painful experiences and wasted numerous hours trying to get web sites / web apps to work correctly with Edge/IE and numerous hacks and workarounds (remember the stupid box model and their refusal to fix it?). Maybe right now we can have a consistent and standardize web browser render engine with minimum differences. Yes, they may pull another "embrace, extend, and extinguish" strategy again but at least right now we have a FOSS web browser and Firefox.

Why you should switch to Firefox web browser? (via HN) If you values and concerns about privacy. First, Mozilla values your privacy. All the browser data (bookmark, browser history, and etc) synced through Mozilla Sync cannot access by any parties except you. Second, the Firefox Multi-Account Containers extension where cookies are not shared and kept within the container tab itself. This means that each tab is a new browser session and isolated from other tabs where you can use multiple identities and accounts simultaneously. For Google Chrome, there is this extension, SessionBox that did the same but do you trust a third party vendor instead of Mozilla? Third, tracking protection is already built into the browser itself.

This Week I Learned 2018 - Week 48

Last week post or read the old stuff instead.

What is this console app that always gave me a conflicting experience every time I use it? ImageMagick. Besides the forking of GraphicsMagick, the use of complex XML format (surprising for a 28-years program at the time of writing) as its configuration settings, it always failed when processing large number of files that exceed its default threshold values. Tweaking it with different settings or disabled it did not resolve the crash issue. Switching to GraphicsMagick yielded the same result. The workaround was convert each image file to PDF in parallel manner and merge all PDF files as single large PDF file.
find . -name '*.jpg' | parallel --progress convert {} {.}.pdf
pdfunite *.pdf scanned_doc.pdf

Does Webpack, Docker Machine, through Virtual Box, and Unix-based host OS work well? No, not really when come to watching changes of files and hot reloading. First, Inotify, the Linux kernel subsystem which notify file changes to application is not and will not be supported in Virtual Box. How about we switch to VMWare? Nope, not supported either. Switching Webpack's watch method to polling have its own issue as well, CPU usage and hot reloading depends on frequency of polling. The key is find the acceptable polling interval. Off course, there are workarounds but not to my liking. If you read carefully, optimal solution using Inotify does not work because the limitation of shared folders through Network File System (NFS) and how file changes event is not communicated between Docker's host and container.

What to consider when designing RESTful API for third parties usage? There are four rules: (1) Use API keys for every request endpoint, (2) Regulate usage through rate limiting using HTTP 429 and API key instead of IP address, (3) Revoke API key if there are usage violation but provides API for client to check rate limits, and (4) Use other means to validate authentication and authorization beside API key.

What are the differences between COALESCE and IFNULL in MySQL? There are several but COALESCE is the preferred choice because (1) It's a standard and should works across multiple DBMS (but do we switch DB that often?), (2) COALESCE support multiple arguments until it can find the first non-NULL value but IFNULL only  support two arguments, and lastly (3) IFNULL is slightly faster than COALESCE. Interestingly, undefined value (1/0) is considered as NULL or missing value.
mysql > SELECT IFNULL(1/0,'yes');
mysql > yes

mysql> SELECT COALESCE(1/0,'yes');
mysql > yes

What is the equivalent of `which` in Windows? `where` as shown below.
C:\where notepad
C:\Windows\System32\notepad.exe
C:\Windows\notepad.exe

This Week I Learned 2018 - Week 47

Last week post or something else.

如何避免成为一个油腻的中年猥琐男? 虽然作者的观点是出自于中国男性的观察,但是任何中年人都可从文章借镜。不认同第八条规,“不要停止购物”。年纪越大,物资需求理当越少,甚至到无。

如何用诗词调情?女:父母不在家。男:等會去妳家。

What the recommended anime to watch in year 2018?  Megalo Box. If you're a fan of Cowboy Bebop (not a fan and way overrated), you will like this anime television series as both share a few similarities. 90's hand drawn style (dirty and raw and not like Makoto Shinkai's style), great and unique characters design (looking at you Fairy Tails and Hunter x Hunter), and predictable story line (rag to riches). Meanwhile, if you are a fan of space opera genre, the remake of Legend of the Galactic Heroes is worth watching as well, if you can ignore the  aesthetic of 3D effects which are unappealing and lifeless (looking at you Berzerk 2016).

How do you access the Docker container as root user? Surprisingly, quite straight forward. Uid of zero(0) is equivalent to `root` user.
docker exec -u 0 -it mycontainer bash

What happened when you're using LaTeX to typeset your thesis? A graph shown below (via Reddit) is worth a thousand words. I can relate to the author experience, instead of working on writing, you're struggling with typesetting.



This Week I Learned 2018 - Week 46

Last week post or something else from the past instead.

What I say to people who are looking for a job? (via HN) Is not about job hunting but a good step-by-step guide on identifying on what you want to do with your life or career instead. The advice is useful to evaluate the reality of what you think you love to do and actually doing it for a long period of time. Very much suitable for fresh graduates who don't know what they want to do with their life. For example, most young people with some programming knowledge dream to be a game developer but once they start building their first game, the initial passion will die down and most will quit after a while. Maybe they don't have the lack of right exposure, support, and environment. Nevertheless, passion, interest, and enthusiasm varies from person to person.

Meanwhile, if you had two months off between jobs what would you be doing? Do nothing but eat, sleep, shit, and repeat (just to unwinding) or travel (not the usual tourist type trip but maybe solo trip). Or go through your long postponed someday list and finally pick something up and pursuit it. Perhaps, "work" as usual but at home doing your thing as usual.

What is like to survive a month without computer? (via HN) He is not the first who tried this before, someone else did it for two months, and another one, a year without Internet. We're left wonder what it's like without any exposure to any electronic devices these days. Can we survive a day without our mobile phone? Doubt so for most people these days. Can you imagine the anxiety of not having your phone next to you? It used to be a norm last time. At the end of the digital sabbath, the author felt that it's not that special or spiritual as he hoped. He did, however, recommend that instead of two months, try digital detox or going analogue for two weeks.

Similarly, Vipassana retreat is harder and requires more mental power but maybe too extreme for most people. Another approach, Mauna, the practicing observing the silence is worth trying as well. For us mere mortal, start small. Away from any digital devices or Internet during the weekend. Off everything after 6pm during the weekday. Start from there, slowly but surely.

I've been investigating digital detox for quite some time and implement some of these strategies with moderate success and failure. Still, more adjustments needed as we're trying different approaches.

Is "not doing anything at all is the most productive thing you can do"? Boredom may be good for your creativity. As they said, "an idle mind is the devil's workshop". If you're stuck with a problem do something else not relevant and does not engage your brain. You subconscious mind will do all the works. I was wondering what if we dont do nothing and just stay in a very quiet place, where you have nothing else to do except engaging and confront your own thoughts, will you go crazy? Yes, in 45 minutes, in the world quietest place.

Do you know how Red Hat was initially funded? 8 credit cards with a debt of 50k. Crazy as it sounds but it seemed this was quite common practices for business that can't get proper loans. The sales of Red Hat to IBM did pinque some interests on its founders and humble beginning (via HN). While I believe they should have use apt as the package manager instead of reinventing another subpar package manager, rpm. They have proven themselves to be the most successful companies or poster boy of FOSS world.

How do you keep track of the articles you want to read? Instead of overwhelmed yourself with pending reading list, the best approach is just "now or never". Why put off when you can do it today? If any articles are important enough or worth your attention, read it now. If you have more then 10-plus tabs opened, then you're setting yourself up for information overload. Often, we save too many articles but never get the chance to read it. Most of these articles are mildly interesting and should be put it someday anyway.

Is there anything else like Memepool? Yes, we have Useful Interweb, "which brings only the best links every day".

What is the worse code base you've seen so far? Oracle Database 12.2. The insight shared by an ex-employee did shed some lights on maintaining extremely large legacy software project, in this case, a database management system. While this mess can traced back to overseas Indian team but US team should shares the blame as well. However, it was mess to start with in the first place. And, as usual, there is always a xkcd comic to describe such insane scenario.