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

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.

This Week I Learned 2018 - Week 45

Last week post or something else from the old archive.

手写的温度还在吗?放慢生活节奏,回归朴实。

What would happened to Red Hat after IBM have acquired it? (via HN) I'm not sure Red Hat will be still Red Hat (you can work your own FOSS stuff even if it detriment to the company) since IBM is well-known for aggressive creating and protecting its patents portfolio. FOSS is not its core business values, it's just another department. But question remains, why purchased Red Hat? They need to control and be a major player as a cloud vendor compare to Amazon, Microsoft, and Google. Red Hat, with its full FOSS stack, libraries, or tools, provides a platform for them.

Build your own professional-grade audio amp on the sort of cheap (via HN), worth it? Not really, unless you're really into learning (great things to do with your kids) and assembly the whole thing. Most of the DIY kits are way too pricey (Cmoy is the exception) and not worth the effort of getting the whole thing from Ali Express. Again, it's not the audio equipment itself, you still needs to manage the audio room or environment with acoustic panels. Be warned, stop when you can and don't buy into the whole system, cables, furniture, panels, and misc. Unless you can hear the differences (doubt so in my case), you're making money from audio, or friscking rich, don't join the audiophile madness.

Why does privacy matter or I'm not motivated enough to take privacy seriously? Well, if you want to prevent something like Social Credit System from the big brother.

Why kick timing is important in swimming? I intrigued by so many coaches overlook the kick timing aspect in the swimming drill. It seemed the focus was on building the stamina through drill rather than the technique and style. With the right kick timing that syncs with hand actions (catch, pull, exit, and recovery). Sun Yang, is a well-known swimmer which utilizes all three kick timing techniques depends on his breathing patterns as shown in his 1500m freestyle world record in 2012 Olympics race. 2-beat or 4-beat kick for the first 1400m and 6-beat kick for the last 100m.

So You Wanna Be a Chef? (via HN) Why the world need more honesty so young people can calibrate their own expectation in their career of choice? If not, we're setting them up for unreasonable failed expectation and brutal honestly about life, especially when come to financial (high student debt) and emotional reality (unreciprocate passion) . While having passion is good for your career of choice, but this does not means you can work for free or being undercharged.

Was Hindu god, Ganesha created to curb Buddhism? Debatable view but one thing for sure, Buddhism influence was limited by Adi Shankara in the 8th century.

When should you go to bed? The right question to ask is what time you want to wake up instead.

What is your books reading strategy? This approach is probably the most comprehensive I've seen so far.


This Week I Learned 2018 - Week 44

Last week post or something else from the past.

如果女人的情敵是男人?【誰先愛上他的】接近年尾发现的一套好戏,题材新鲜,值得推薦。自从台湾合法化同性恋后,值得一看的一套喜剧。我们应该同情他,还是指责他呢?感情之事,谁可定论呢?

What is GNU Kind Communication Guidelines? (via HN) The first comment (shown below) caught my attention of effective communication. However, there are always exceptions.
This is excellent; using love and persuasion to help someone improve is so much better than by force, compulsion, and fear. How many children rebel against restrictive and domineering parents? but a child who is loved and taught, but allowed to make choices and pursue independence usually ends up much healthier and happier.
Why digital detox is still more than essential these days in digital era? Repeated interruption leads to lost concentrationDiscussions at HN thread proposed several ways but is there a way to reduce this impact? Yes, but without discipline and life style changes as we're too digitally connected. For a start, take life slowly and be more patience. For example, reading a dead tree book is harder these days we have alternative and faster way to do so. But, isn't it nice to just slow and enjoy the smell and texture of the book while doing so?

When does education stop? (via HN) An essay of justification for studying liberal arts against the practical Science, Technology, Engineering and Mathematics (STEM). Regardless the choice you made in your life or career path, love what you do, and do what you love, provided you don't starve yourself and your family to death. Note the article is hosted in David Bull's site, a very dedicate gaijin woodblock printmaker on preserving and populating Japanese woodblock printmaking.

How to write a technical paper (pdf)? (via HN) The advice on writing good abstract was the best I've read so far. Easy, step-by-step, and straight to the point. Not to mention several other ways such as rules, formula, or algorithm as recommended for further reading.

What do you do in your 1-on-1s with your direct reports? Build trust.

How to check the React version of the app using it? There are many ways (depends on the ReactJs library was minified or not). The simplest way so far (may not work for all) is as follow. Is Facebook is using the latest greatest version? Seemed so.


This Week I Learned 2018 - Week 43

Last week post or something else from the archive instead.

What should you do when you're taking vacant possession of the new property in MY? Download (PDF) the document CIS 7:2014 QLASSIC (Quality Assessment System in Construction) from CIDB (Construction Industry Development Board Malaysia). Read it, print our the checklist, and go through your property to check for any defects. A homeowner have the legal rights to request property developer to rectify any issues within the Defect Liability Period (DLP). Is there any property developer who dares to include this checklist and document during the handover of a new property? Doubt so.

What is like to be a engineering manager? You have no power, take the heat for your team, and mostly focus on management (office politics).

Can you explain JavaScript's closure like I'm five? So many explanations but this example is simple enough to understand. The next step is to understand how closure was used in JS world. Current stage is like you know how to hit a pool ball but don't know why you need to hit it in a certain way.

What the heck is Perl11? (via HN) Well, is Perl 5 + Perl 6. Again, endless drama on the direction of the language itself. Perl have the opportunity to shine and lead the way but lost it. Perl 6, on the other hand, is too little too late.

What are $_, @_, %_ used for? I was quite surprised by the reply, but this answer was outstanding. The `$_` known as default topic variable can be referred as "fill in the blank". How come I never think of that analogy?

What are the non-free installed in your GNU/Linux distribution? Well, you can ask virtual RMS. Running this in my lappy shows the usual suspect packages. Yes, the proprietary drivers or firmwares still remains an unsolved problem for FOSS ecosystem that does not follow the Free System Distribution Guidelines (GNU FSDG).
$ vrms
                Non-free packages installed on x230

amd64-microcode                     Processor microcode firmware for AMD CPUs
fonts-ubuntu                        sans-serif font set from Ubuntu
i965-va-driver                      VAAPI driver for Intel G45 & HD Graphics family
intel-microcode                     Processor microcode firmware for Intel CPUs

                Contrib packages installed on x230

iucode-tool                         Intel processor microcode tool
ttf-mscorefonts-installer           Installer for Microsoft TrueType core fonts
virtualbox-5.2                      Oracle VM VirtualBox

  4 non-free packages, 0.2% of 2788 installed packages.
  3 contrib packages, 0.1% of 2788 installed packages.



This Week I Learned 2018 - Week 42

Last week post or some random stuff from the past.

Can you still be a developer in your 60s? Yes, it's still possible (look at Carl Sassenrath) but looking at the poster qualifications, he is over qualified and can be very intimidating to someone. The root cause is still "cultural fit' and ageism. Perhaps the poster can join the FOSS movement and contribute to it instead? Looking at the positive side, if you can survive until 60s and is fit to work, consider yourself very lucky than most people around that age. Nonetheless, just live below your means, be healthy, and enjoy what you're doing.

Why good sleep is crucial for learning? (via HN) More importantly, insufficient sleep can lead to numerous health issues and diminish your enjoyment of life. While you can't feel the impact when you're young, only at certain age, you will sense something have messed up somehow somewhere in your body. While it varies by person, but you needs at least 8.5 hours of sleep. If you're working, minus your working hours and travel times, with 8 hours of sleep, you're left with 6 hours to do your own errands. What can we do? Lifestyle changes and stick to a constant schedule, every day, every single damn day.

Is semicolon necessary in TypeScript? No but it's good to have it for consistent results, especially for new comer and coding convention. Even this is recommended by Ecma TC39. Off course with much debates and interesting point of view. I believe in the camp of better safe than sorry, just use semicolon;

What should a front end developer knows? Here are some common topics you will encounter eventually.
  1. ForEach vs. Map
  2. Promises vs. Generators
  3. What are the states in Promises?
  4. How many ways to lazy loading an image?
  5. What are the differences between Local Storage, Session Storage, and Cookies?
  6. What is event delegation in JavaScript?
  7. What is Cross-Origin Resource Sharing (CORS)?
What is 30 seconds of code? A bunch of JavaScript code snippets that demonstrates different features of this programming language.

Why we need `EXPORT` and `EXPORT_OK` in Perl? Well, we use the later if we need to let the library consumer or caller to explicitly import the module's symbols like subroutines, variables, constants, and so forth.

This Week I Learned 2018 - Week 41

Last week post or rather, old stuff from the archive.

Do we have an obsession with home ownership? (via /r/malaysia) While the discussion was referring to fresh graduates who are started out, the general rule of thumb still applies for everyone. Don't buy a house if you don't intend to stay more than ten years. Or don't buy houses 3 times more than your annual salary. Never equal home ownership like status symbol (just like car), you're taking a huge financial risk and long term repayment period. Another approach is to start small buy buying a low cost flat, stay in it, rent it, and sell it to buy a better house.

Judging by the current trend through NAPIC (National Property Information Centre), it's best to rent and wait before buying. Furthermore, the saving from your monthly mortgage installment into other investments will out weight the interest paid and potential capital appreciation of your property. By the time you're ready for retirement, might as well move to some where outskirts and rent again and live off the dividends of your investment in your golden years. Off course, if you're planning to get marry and owning a home is crucial to satisfy your SO and in-laws (another status symbol issue), first time homeowner can apply through PR1MA, which was created to prevent wealthier people from inflating the housing prices.

Now, instead of taking advice from armchair experts in the forum, why not do your own calculation using the The New York Times' rent or buy calculator.

Ignore this discussion if you're one of those crazy rich Asians.

And by the way, there have been quite a discussion where the upcoming Budget 2019 will have an impact of the housing prices. We will wait and see then.

Do you need a bigger house? No. We spend majority of our times in the kitchen, living room, and bed room. Perhaps a SOHO (Small Office Home Office) suite is a preferable choice if you don't have kids or big family.

How many ways to refresh a page in Google Chrome? Three. Only if you've open the Chrome Dev Tools and right click the refresh button as shown in the screenshot below illustrates this. Now, what are the differences between these three refreshing methods?  Normal reload will use re-validate and use cache files when needed. Hard reload will skip the cache and re-download everything again. As the name implies, empty cache and hard reload will clear the cache file and re-download everything.


What the fsck with Perl's constant? Besides the default `use constant` pragma, we have 21 (yes, bloody 21 ways) Perl's modules to deal with constant or readonly values. Worse still, none of these modules satisfy the needs of proper constant usage, it's a case by case basis. The recommended one is Const::Fast. More on this in coming posts.

This Week I Learned 2018 - Week 40

Last week post or something from the past.

What is the most expensive Koi fish sold at this moment? USD 1.7 millions! Yes, that was bid for for a champion Koi fish from Sakai Fish Farm. From the video's comment, the lady bidder is Chung Ying Ying, the Koi queen from Taiwan. Not really a fan of Koi fish as I do enjoy viewing fishes from side view instead from the top.

How can you write longer articles without adding more words? Switch to Times Newer Roman font which extends each character by 5 to 10 percents wider.

Why I'm grateful to live in MY instead of ID. (via Reddit) It's quite crazy there were so many instances of earth quake or typhoons at our neighboring countries. In return, we got their haze and labours.

Why should I croak instead of die? Use croak for the caller mistake and use die for the code mistake. According to the Carp module documentation,
The Carp routines are useful in your own modules because they act like die() or warn(), but with a message which is more likely to be useful to a user of your module. 
What if the subroutine returns a list but you want to assign it as an array reference? Use anonymous array.

How to resolve "Cannot determine local time zone" in Ubuntu under WSL environment? You will need to reconfigure your timezone again as a workaround for WSL constraint.

This Week I Learned 2018 - Week 39

Last week post or some old stuff.

《没换气过》。哭笑不得。音响还没弄好,期待播放这首歌试试看。

What is the worst pain you've ever experienced? For a woman, giving child labour. For a human, kidney stones. Contrary to the headline, (via HN), it's NOT beautiful at all but excruciating painful and can put a tough guy down to his knee.  Imagine coral reef passing your kidney or being stabbed in your kidney. If you're facing financial issue, maybe you should try roller coaster to get those stones out. Yes, it works and it's proven scientifically. What can you do right now? Prevention is still better than cure. Less salty food and drink plenty of water, like 2 litres per day.

How many books you should read at a time? Three. One hard, one easy, and one very easy. Currently I'm reading just one hard book (the material is so dry). The next step is to find another easy (fiction perhaps?) and very easy (manga?) book. Which time slot I should allocate to? Judging from my almost daily progress, is it possible to finish three books per month?

What is the most additive game in this year's JS13kGames competition? (via HN1024 Moves and I'm quite surprised and addicted to the games. The creativity shown in some of the submissions have reminded me how computing power have changed since the early days of computing.

How do we prevent muscle loss as we age? (via HN) Nothing but strength training. Every single fscking day. The MRI image below tells a lot about the importance of exercise towards maintaining your muscle flexibility regardless your age. The usual exercise regime should be 150 minutes and 3 times per week. Instead of cardio, maybe I should focus on strength training (weight lifting). Furthermore, building muscle actually burns more fat.


So Good They Can't Ignore You? (via HN) I can relate to the opposite view instead what of the book preaches. Is the book worth it? Yes, it's a popular-science writing made easy for layman. Once you've done with the book, you should explore something deeper like Flow: The Psychology of Optimal Experience. Read both book and the scientific papers published. Regardless your passions or skill sets, reality have to step in.

What is the dark side of working at a successful startup? Not surprisingly, money and lots of money. Money changed people. Sadly, towards the evil side of human nature. Some may argue this is reality of life. Perhaps.

Does four days work week possible? (via HN) Yes, either four-tens or you take a pay cut. Possible for those working in Asia region? Doubtful.

Which type of programmer you are? There are two types, starter and finisher.

Next.js? If you need a proper framework than the bare essential React. The frontend is so crowded and mess right now.

This Week I Learned 2018 - Week 38

You may like to read archived posts or something from last week?

What happened if your Perl's structure exceeded maximum nested level? You will get this error message of "json text or perl structure exceeds maximum nesting level (max_depth set too low?." I was surprised that certain structure may reach over the default level of 512 (a sign for you to redesign your data structure). Changing the 'max_length' threshold to unlimited did not solve the problem. Likewise, switching to the faster JSON::XS. Looking through the data structure did not indicate any circular loops? Due to time constraints, in the end, I just switched from text to binary serialization through Sereal package (benchmark wise is better than others).

What happened when you exceed the maximum daily exposure to Bisphenol A (BPA)? (via Reddit) So many things that can mess up your immune and nervous system. You should avoid drinking from soda can, plastic bottle number 3, 6, or 7, plastic cups, and paper receipts (those using heat). One thing for sure, avoid drinking from any plastic bottles exposed to the sun (especially left in the car). Temperatures shift may leach this chemical into the drinking water. What worse is there is so little studies on the side effect of this chemical, we may only figure out the harm it causes in coming 30 till 50 years. For now, just use nothing but stainless steel (18-8 food grade) bottle (e.g. Klean Kanteen) or glass jar. Also, do no microwave food in plastic container or wash them in dish washer.

Worse still, there are more of these harmful chemicals. The American Academy of Pediatrics have written a policy on identifying and preventing these chemicals from entering our body. If the paper is too long, read the summarized version by Harvard Health.

How do you slow down a gif image? Use GIMP and GAP libraries and adjust the delay between frames.

Why Git was more popular than Mercurial? (via HN) The battle of DVCS have long won by Git (largely due to GitHub and GNU/Linux) even though Mercurial provides a better usage experiences and documentation, based on my biased preference opinion. I'm quite surprised that a bottleneck performance issue (as it was written in Python?) in large repository is still not resolved after all this while even though performance-wise, both are quite the same (old benchmark in 2011, things have surely changed). What's next for DVCS? Pijul, written a Rust and inspired by Darc. But I doubt it can dethrone the popularity of Git in coming future.


This Week I Learned 2018 - Week 37

Something from the archive or last week post.

If you want to do a YouTube video on tutorial on photography, how should you do it? So far, nothing can top this video. Well choreographed, interesting topic, and relevant demonstration on applying Morandi (a famous 20th century Italian still life painter) colour style in your photography. What impressed me was the tutorial was not focusing on the post-processing but instead stressed on the importance on scene selection and model's clothing choices. Sometimes, you can't simply post process (photoshop) everything.


How easy to setup development workstation in Ubuntu these days? In seconds, if you exclude the time needed to download all the packages. I've been looking into TypeScript, React, and VS Code these days and it's the right time to setup a new development environment through Ubuntu's Snap.
$ sudo snap install node --channel=10/stable --classic
$ sudo snap install vscode --classic
$ sudo snap install --edge typescript --classic

What is the best approach to read a book? Reading with a pencil  (via HN) or also known as marginalia. The idea is simple, you're basically collaborating with the book author by scribbling down your questions, thoughts, and ideas in the free margin space (limited for some books). In other words, purposeful annotations while reading or active reading (suitable for research papers but not some book genres where you read for leisure).  Also, such reading method is not applicable for ebook reader (yes, reMarkable exists but the steep price does not justify it), which still does not provides a good paper experience for doodling.

Is JQuery dead? Not yet but soon, probably within these few years. Reading through the blog post by Github Engineering on removing JQuery from Github frontend, little have I realized that the frontend (JavaScript) have matured enough to deprecate JQuery. What does this indicates? The web have move beyond the dreadful old incompatible Internet Explorer versions, which the main reason of the existence of JQuery project. What next? TypeScript becomes ES Next (maybe?) and the standardization and popularity of custome web components. One thing for sure, old things will be rediscovered, reimplemented, and rehyped again and again, as usual. Same old same old. (ง'̀-'́)ง

How to teach yourself hard things? (via HN) Alternatively, the Richard Hamming tackled this in his The Art of Doing Science and Engineering: Learning to Learn course and Edward Kmett in his Stop Treading Water: Learning to Learn lecture. Furthermore, comments in HN provides us with a few good gems in area of exercising, programming, or physics. However, this is only applicable for those who are discipline, having intrinsic motivationgood quality sleep, and don't get burn out (you will eventually). In short, learning will come naturally if you interested in tackling the problem itself. Time is limited, pick your battle wisely.

Why Microsoft Word is a better writing tool than LaTeX? Reading through the post by Thorsten Bell on the tools he used to write his book (via HN) reaffirms the mistake I've made when typesetting documents, books, and thesis using LaTeX, ConTeXt, and pandoc. Fancy tools may distract you from doing what matter most, writing itself. If the writing is difficult, we can be sidetracked through fiddling with these tools under the pretense of productive procrastination.That's why, a slow and noisy typewriter (surprise that it's still expensive these days) was such an efficient tool for writing. You can't do nothing else but type or write. Which is why so many distraction-free editors exists in these Interweb days.

Why I still love PostgreSQL after all these years? 100-plus of custome data types (even table and view can be as well) supported in the database itself (via HN). Programming languages can change numerous times for a long maintained systems. Not sure for the database system. Some developers prefer strongly typed programming languages, but they seldom look into database systems with custome data types support.

How do we test web service API through console or command line? (via HN) There are so many choices like Strest, Newman (console version of Postman), shakedown (Bash script), karateDSL, UnRAVL, Artillery, and Tavern (Python-based). Coming from console background, I have preference for shakedown and Tavern due to its simplicity.

To rent or buy a house? HN user isostatic gave a practical answer to this question. Buy if you're investing, having kids, or don't want to be forced to move. Rent if you don't want to maintenance the house.

What is the symptom of midlife crisis in a good way? Extreme athleticism. (via HN) One key point I agree with the writer is that we're preparing for the coming old ages as highlighted in this quote. Interesting days ahead.
...... extreme fitness is less about being young again and more about building yourself up for the years ahead. In other words, getting better at getting older.