Showing posts with label health. Show all posts
Showing posts with label health. Show all posts

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.

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.

Reducing Blood Pressure Through Omni Heart: A Variation of DASH Diet

Maintaining good health is one of the core criteria for a good quality of life. Unfortunately, in this modern society, convenient access to all basic necessities, unhealthy life style, and overly intake of processed food leads to all sort of health risks. More so for those who are genetically susceptible to these risks. In Chinese, these health risks are known as "三高症", literally translated to "three high diseases" which includes "高血压" (high blood pressure), "高血糖" (high blood sugar), and "高脂血" (high blood cholesterol).

The typical answer to prevent this is, just lose weight. Yes, this is possible if you're young, having good genetic (be grateful to your parents), and have an active life style which allows anyone to pamper themselves with those processed food which are high in sugar, sodium (use interchangeable with salt but there are other food sources that produce this as well), and fat. What if you're not belongs to the former group of people that is impossible to achieve weight loss? Nothing but eating a healthy diet.

What is the most effective diet for reducing blood pressure then? The Omni Heart diet, which is a variation of DASH (Dietary Approaches to Stop Hypertension) diet. The core principle of DASH diet is to consume high nutrients foods mostly consists of vegetables, fruits, nuts, and low-fat dairy with small amounts of saturated fat, trans fat, and cholesterol. The OmniHeart diet recommends on taking more proteins instead of carbohydrates to reduce blood pressure even further. A comparison of three different diets have shown that OmniHeart is the most effective approach. The screenshot (Source: Harvard Health Publishing) below shows the DASH as well as the variation of Omni Heart diet plan for a daily 2000 calories intake.


As for any behaviour changes, following OMNI Heart or DASH diet turns out to be quite a challenges, especially you're from other parts of the non-western world. What is the equivalent menu items for those living in Asia? The menu was catered for those living in the western world. Certain food sources like berries, yogurt, nuts, and others are quite expensive. Furthermore, those who are lactose intolerance have to find other replacements. For any diets, planning ahead is essential and home cooking is not possible for those who have a daily busy schedule.

The recommended approach is to take the first step and follow this guide. Make adjustment along the way and replace with local ingredient if possible.

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 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.

This Week I Learned 2018 - Week 31

Last week post or something from the archive.

What is the most mind-blowing thing I've accidentally found out about Thinkpad? Fn + Space toggle the light at the top of the monitor, near the web cam. Seriously?

為什麼時間感覺有時過得快、有時過得慢? 我之前已经有提到随着年龄增长,你就会觉得時光飛逝,但是只是用岁月来简说如此经历,一点都没有科学根据。然而,啾啾鞋的解说,终于让我也明白为何我会有如此体验。简单的说,是我们自己的脑作怪。仔细说明,理由有三。第一,暂时性幻觉 (Temporal Illusion)。第二,伸缩效应(Telescoping Effect)。第三,停表错觉(Chronostasis)。


大叔为什么能配萝莉?戏剧有点美化的中年危机?重点还是量力而行,自我调节。

What to do this too much advice? (via HN) We are always looking for confirmation rather than advice. Furthermore, advice is always cheap anyway.

Are there receivers to avoid on the used market? Any Onkyo receiver with HDMI daughter board. I've confirmed this with local audio shop which sells a lot of second hand AV receiver. Why so? It seemed their circuit board was designed to run everything (analogue, optical, and coaxial) through the HDMI board. And when you have faulty HDMI board, nothing works. The funny things is browsing through some YouTube videos, the fix was quite easy by replacing the faulty capacitors. Does the same problem exists for newer AV receivers. Not sure but discussion with the shop owner indicates that it's wise to pick some other brands instead.

Is the Sony Core SS-CS5 bookshelves speakers most unknown and underrated speakers? I'm quite surprise that one Redditor claimed that it's even better than Klipsch R-15M, KEF Q1000, Elac B5 / B6, or even the popular Pioneer SP-BS22-LR. My research indicates that this is true to a certain extend, one reviewer mentioned that the pro of this speaker is the clarity of the music but lacking in the mid range and bass. The clarify of this speaker was proven that someone even suggested that we can using this pair as center speaker instead. In other words, not a all rounded speaker. And by the way, Elac and Pioneer are hyped not because of the quality but due to a certain quality within that affordable price range.

This Week I Learned 2018 - Week 28

Last week post or something else from archive.

Why Aloha shirt is still not a common official men wear here? Via HN. We're living in a tropical country and yet our normal office wear is following western style. On the related note, the history of Aloha shirt was an interesting read as well.

Looking to get started in medication but don't want to fork our money? Look into the UCLA's Guided Meditations audio tracks. Download all and make it a playlist.

What the difference between informational support and emotional support? If your SO talked to you about her problems, just shut up and listen. Do not offer any solutions to her problem. Just listen and understand. Discussion at Reddit agreed with that. Don't assume. Ask or request what you want, if possible, explicitly. If you consult a doctor, are you going to tell the doctor that you're sick and he/she should know what sickness you've without you disclosing more specific details?

Stuck at your current tasks or your goals during the weekend? Chop wood, carry water.

Looking for food pyramid in the context of MY? Yes, it seemed we have a guide or alternative summarized version that from Ministry of Health. While we at it, there is another guide for low cholesterol diet as well. Why they don't provide a printable PDF version or compile everything into a booklet instead?

You know what is craziness when comes to set up your home network? Unnecessary and over-engineered enterprise level setup.

Joining the Utrawide Master Race but short on moolah? On first look, the LG 29WK600-W looks like a good choice if you're short of cash. However, it's best to check the actual specifications of the monitor before making any purchase. The panel bit depth is actually 6-bits + RFC and not really 8-bits, hence the 16.7 millions colours is overstatement. While the split screen functionality is nice, it has it's own security issue if you're running Windows. For GNU/Linux, there is Fake Xinerama or gTile (if you're using GNOME) that simulates several virtual monitors.

Setting up a home audio studio? This advice is a good way to start.

Is Anabas testudineus (also known as Puyu in Malay) suitable for consumption? Yes, and it's being massed produced as ornamental fish (gold colour variation) or as food source. I've long knew this fish but never realized that it actually travel through dry land to mate as shown in video below. And the hormone that the breeder used is most likely Ovaprim or GnRH, a spawning agent to induce breeding for fishes in captivity.


Do no feed the female Betta a day before breeding and let mating happened after 6pm because cooler temperature is good for bredding Betta? The issue with online resources when come to fish breeding procedures is it's quite hard to differentiate anecdotal experience or scientific result.

This Week I Learned 2018 - Week 26

Last week post or something else from archive.

What does meetup these days feel like? Same old same old. It has been so long since I last went for a local meetup without last minutes cancellation or interruption (from my end). Few key observations. First, never interrupt and overshadow the main presenter. Participants should complement the content of the main presenter and sadly most of the time, the discussion was sidetracked into something else. Second, working with right people and challenging problems can be a catalyst to improve your technical abilities and increase your exposures. Third, there is no need to justify any tools of your choice. Sometimes, we use certain tools because we simply like it. Nothing more and nothing less.

Why Colistin have been slowly introduced to our food chain?

想找一个比较好做的事?绝无此事。理当做好自己的本分,做该做的事。别蹉跎(cuō tuó),浪费时间。

Building another laptop? Thinkpad x230 is a good base laptop before mod right now.



Good books by Malaysian authors? It never occurred to me to read "great" (subjective here as popularity does not equal good) books by local writers. Nevertheless, below are the list of writers: Tash AwTan Twan EngAdibah AminRehman RashidRamlee Awang MurshidShirley LimYangsze Choo, and Amir Muhammad.

How do you identify different colour patterns of Betta fish? We always having a hard time remembering which colour patterns. Some good examples (PDF) by Megan Woodrow:


How often should you change your water in Betta growing up tank? Daily with 50% till 90% water changes. No wonder our fry was growing at inconsistent rates and sizes. Optimum growth size is 8 till 12 weeks to reach show grade size.

This Week I Learned 2018 - Week 25

Week 24 post and something from archive.

中国最后的剑圣, 于承惠。在中文影坛里,在也找不到另一个演员能诠释演出这个角色,从霸气的恶人角色到闭山修行的一代宗师。可惜,晚年在影坛没参与任何武侠片。

How to Survive Your 40s? (via KH). As someone who going to take a leap into this new decade, I can probably relates (the screenshot below tells quite a lot as well) to the author experience. Since few years back, younger people have started to call me "uncle" (my choice of clothing did contribute to that as well). It's a sudden but natural shift that comes with your age. The article reminded me of a Korean movie (can't remember the name) I've watched few weeks back. Basically the protagonist (someone in his 50s) said you need to see this milestone as the second 20s. The second time for you to reflect or follow up with what you've done (differently this time) in your 20s. The to-do list since so many years ago is still so long and it will keep me occupied for so some times.



What the difference between Perl and Python? If you need a comparison between both programming languages, this book, "Scripting with Objects: A Comparative Presentation of Object-Oriented Scripting with Perl and Python", while quite dated (it was written in 2008), provides some insights on differences between these both programming languages. In the end, the rising popularity of Python and emergence of Perl 6 shown that, opinionated or there should be a standard way of doing things won.

Why you need to set default value in `sub` in Moo or Moose? Because having a subroutine wrapper returns a unique reference every time you create a new object.

How do you boot from USB thumb drive from Grub itself? Yes, this is possible (do read the whole discussion). You must go to the Grub console by pressing 'c'. Remember that you can tab to find out which removable media and partition to use. It's quite annoying that sometimes the BIOS cannot detect the removable media (thumb drive) and can't boot from the device itself.
grub> ls
grub> set root=(hd1, msdos2)
grub> chainloader +1
grub> boot

On a related note, migration from Fedora 27 to Fedora 28 was such a painful experience. The keyboard and mouse did not work and were very lagging. I'm not sure, but Fedora 28 was such a let down. In the end, have to wipe out the whole installation and replaced it with Ubuntu 18.04 and everything works as intended. Seriously, Fedora, what is going there with 28 release?

Why they said Perl is a more advanced scripting language for system administrator? See App::GitHubPullRequest, a Perl console tool that glues together three different console tools of git, stty, and curl.

How to train your kids to do house chores voluntarily? (via HNEmpowerment since toddler.

Dreadful tasks? Just try, give it a while.

Which Perl modules to use when making HTTP requests? There are so many.

How does you do dispatch table in Perl? Found an old discussion (2010) in HN. The book High-Order Perl have a whole chapter (PDF) on this topic.

This Week I Learned 2018 - Week 14

Something from the archive or last week post.

We have been doing blood pressure measurement wrongly for all this while. You must measure blood pressure from both arms. Yes, both arms and find the differences. According to Harvard Health,
"A blood pressure difference of 10 to 15 points or more between arms also boosted the chances of having a stroke or dying from cardiovascular disease. "
Personal data and GDPR: practical guide for developers. Shaking my head while reading through the whole post. I was wondering how a software team going to ensure data anonymization in development environment when handling production data? When come to this, the US/Canada software houses are doing a better job than the EU/Asia counterpart.

What if we apply this to our life instead? Rearrange your line of thoughts in your writing. Intriguing discussion when come to writing.


"The Surgical Team" (chapter 3 in the infamous book, The Mythical Man-Month), a different software development team structure which it's similar to the surgery team where,
"The idea was to construct development teams in a way similar to the surgery teams - one lead developer, one assistant developer (these two "adult" and very good), and a 3-4 other people who 's job is to make the life easier for the main devs - someone to manage documentation, someone else to do detailed testing, one average dev to do the simple and boring stuff, and so on."
Maybe an alternative approach where the Agile methodology like Kanban or Scrum cannot be applied successfully or productively. Why so? Cargo cult software engineering, as coined by Steve McConnell where software development houses try to imitate successful processes or approaches without understanding why such methodologies works for them. What works well (may due to luck and timing) for an organization or team may not be suitable for another organization or team. Don't uses Scrum for the sake of using Scrum. Another good example, the reinventing of office space, open office, pool table, ping pong table, gaming corners, and the like. Yes, the startups starter pack.

Fork and Pull Request Workflow. While version control system have been available since the 70s, till today, amazingly, some companies still refuse or slow to adopt it. Everyone have their own workflow and branching models.

Quite a number of MySQL Gotchas this week. Fair enough, it will happen to any of the DBMS out there. My tolerance towards MySQL have increased along these years. Must be something to do with getting old.

How do you order a list of items where the NULL data is at the bottom of the list? It's actually quite easy, just use ORDER BY ISNULL. See the example below.
SELECT * FROM table ORDER BY ISNULL(field), field ASC;

NULL, NULL, NULL, 1, 2, 3, 4
1, 2, 3, 4, NULL, NULL, NULL

Creating a function in MySQL. That was rare but somehow we may need it to reduce or shorten the SQL query. Yet, we kept encounter this idiotic error of "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER |' at line 1". Just add a BLOODY space! Yes, a BLOODY space before the semicolon!
DELIMITER //
Create function or procedure
Write your function or procedure here...
End (without semicolon)
//
DELIMITER ; (semicolon with space)

Write UPDATE SQL query with multiple joins and SUB-SELECT but the query won't work in SUB-SELECT? Wrap the SUB-SELECT condition with one more join!
DELETE FROM story_category
WHERE category_id NOT IN (
    SELECT cid FROM (
        SELECT DISTINCT category.id AS cid FROM category
        INNER JOIN story_category ON category_id=category.id
    ) AS c 
)

How many ways to insert a not found record in MySQL? Plenty of ways. Not sure these works cross database systems.

Career do-over? Either moving to management and if you don't like it, restart your development career again.


This Week I Learned 2018 - Week 13

Last week post or something from the past. This going to be a very long weekly post. So many things written down this week and might as well put everything together.

又是那个季节。每当这个时候,都会想起唐代杜牧的著名诗句。以前倒是没什么去注意了解,但是没想到,根据百科解说,每一句都是诗者高明的写法。随着年龄增长,是时候重读起唐诗宋词,陶冶性情。
“清明时节雨纷纷”。第一句,交代情景、环境、气氛。
“路上行人欲断魂”。第二句,写出了人物,显示了人物的凄迷纷乱的心境。
“借问酒家何处有”。第三句,提出了如何摆脱这种心境的办法。
“牧童遥指杏花村”。第四句,写答话带行动,是整篇的精彩所在。
The Nightmare Letter: A Subject Access Request under GDPR (via HN). GDPR (General Data Protection Regulation), the new data protection law coming into force on 25th May, 2018. Ironically, an article posted in a site that making profit from our shared data. There always this saying I read online many moons ago regarding privacy, "If you have done nothing wrong, then why you need to worry about people tracking your Internet usage?". And the counter argument to this question is "Everyone knows what we did in the toilet, then why we still need to close our door?". Corporations have long monitored and tracked our daily movements and behaviours and people needs to be educated and aware of such activities and their right to erasure, also known as "the right to be forgotten".

Off course, all these discussions was due to the recent social media data breaching. And usual things was, some noises were made, another call for deletion of your social media account, and things will cool down, and live goes on. Nothing drastic will happen, people still will keep their social media account and no one will delete it. Social media site will be replaced by another social media site, somehow or another.

Surprising to find out about this on feeding Betta fish (emphasis added). And we were feeding the Betta fishes with more than 2 to 3 pellets! Pellets will expand in their stomach. No wonder some of the Bettas were having constipation issue.
Adult bettas can be fed once a day and babies (young) can be fed twice a day. It may not seem enough, but many pellets expand to more than 2x their size when they get wet. To put this in a further perspective, the stomach of a betta fish is about the size of their eye! Additional power supplies may be necessary depending on the level of activity and personality of your betta.
Read the story about the origin of Giant Betta. Most of the new Betta type was due to anomaly of breeding and continuous selective breeding.

Reality when comes to management as described below:
In this case, it's management giving the impression that they are "doing something." We see the same thing with, "can we add more developers to speed this up?" The answer is almost universally "no" and, presumably, any manager in the modern era should have read (or at least be familiar with) the over 40 year-old book, "The Mythical Man Month." But, from a senior management position, there aren't many levers to pull--and when the heat is on, they have to be seen to "do something."
Write or build your own software projects. Yes, is a time waster to re-implement something from scratch, but you will gain valuable insights by doing so. Build your own React is probably something relevant that everyone should look into if they wish to understand what the hype about front-end development using React and the like.

Thought provoking post on how Lisp, the programming language ruined a person development career (via HN). Are you a software plumber or software developer? The comment did raise an interesting question on how once see his or her software development career. If you're doing mostly business software or glorified spreadsheet, then you're a plumber, not the later. If remember correctly, long ago, there was this discussion about software developers who are producer and those who are consumers.

Is the ability to focus the key skill that separate successful and unsuccessful people. This HN user think so. The next question is how to increase your focus?
Pretty awesome! If I ever had to say the one thing that differentiates successful people from unsuccessful people it wouldn't be intelligence, or even perseverance, or passion. It'd be focus. With focus, you can be amazingly successful in so many types of occupations.
(That being said, passion / perseverance / intelligence can often lead to focus)
How to tell great story? Feeling stuck or suck? Just follows the Pixar’S 22 rules of storytelling. Rule number 4 or the The Story Spine way is the most common and popular.
Once upon a time there was ___. Every day, ___. One day ___. Because of that, ___. Because of that, ___. Until finally ___.
Meanwhile, while reading about writing, saw this post about whether we can start a sentence with a conjunction? Definitely yes. Good examples shown below:
It’s a pretty smart and progressive budget. But do you think those changes go far enough?
Some people are calling this film the worst movie ever. And who are we to argue?
Dworkin’s answer is no. But why not?
Who would have thought it? And is it really true?
While we at it, this week vocabulary list. Lots of similar words and it was quite hard to link these words up into a cohesive paragraph.
When sedition (煽动叛乱) law have been applied selectively, societies will slowly disintegrated (瓦解) from within rather by external influences. Inconsistency and partially interpretation this law will result in serious crisis in the legislation and judicature (司法) of our country or worse, the ridicule (奚落) of our judicial (法庭的) system. Therefore, there should be a judicial review of the law should be an integral (整体) part of the to the rule of law. That was David, an adjunct professor (副教) of law, judicious (有见识的) closing statement before the class adjourned (休庭) for lunch break. While he was discussing remaining details with his fellow students, Mary, his personal assistant, interjected (插话) their discussion to remind Davis about his itinerary (行程) for today. He should be in the transit (中转) lounge at the airport in two hours and additional amendment of this law was not be the ambit (范围) of their discussion right now.

This Week I Learned 2018 - Week 12

Last week post or something from the past.

A minor adjustment of book placement and I've been reading one page per day without any interruption for the whole week. Keep the reading streak going!

“城市套路深,我要回农村”。曾经流行过的网络流行语。最近开始关注中文网络的动向,也接触不少网络流行语。话说回来,是人性本善,还是人性本恶?或是性无善恶?姜源的解说,读起来蛮有道理的。

There is a Chinese idiom, “对症下药”. With the right medication, a disease can be effectively cured. Surprisingly the medication that I've impulsively bought reduce the inflammation and speed up the recovery process. The problem have been plagued me for the past 4 years and it's finally reaching to an end. Surprising (not really after you went through different doctors), I've consulted a few doctors in the past but they can't seem to give the right prescriptions (can't blame them, doctor these days just want to sell more medications that fix symptoms). In the end, I've to thank to that pharmacist who ever he is.

Two interesting English words I've found, may sounds a bit too fancy. Big word, they said, nevertheless sounds "intelligence". Affordance. When come to daily object interaction, the handle of a cup is a good example to describe the words. The handle gives an obvious way on holding it. Kerfuffle. This was a popular words this week in the NBA, basically refers to a commotion between NBA players. Yes, big word.

Back to regular weekly learning new English words. Here we go.
The posthumous (作者死后出版的) publication of the researcher on the hydrodynamic (水力的) model of the eruption of the underwater volcano aroused quite a few interests among the archaeology field. While the late researcher main focus of the publication was on the igneous (火成岩) rocks formation, there was a section which documented about the ancient ideograph (象形文字) found within the underground caves carved (雕刻) by the lava near the coastal(沿海) and insular (海岛的) area. Insulated (使隔离) from the air under the sea, archaeologists are still puzzled how the ancient civilization were once ever existed in that area.
Hoarding? Too much stuff? Read this post on how a Redditor removed that habit. In short, go to thrift shop on weekly basis, you will aware that most stuff bought or collected will ended up there. The most memorable things are your experience in life, captured in photos or some ways or another. Definitely something to ponder.

This Week I Learned 2018 - Week 04

Last week post or the archived stuff.

Fourth week of the new year and we've reached also the end of first month. Interesting that time flies and progress of the pending to-do list items still slow but moving ahead.

人生的長尾效應:25、35、45的生涯落點。职业的第二个阶段,你要如何去面对?当然我在多年前就清楚我擅长什么,热爱什么,及那些是备受肯定的能力。如何在自己的生涯中找到自己的落点? 职业生涯长达45年,在你人生中占据了一大半的岁月,自己好好去规划。记得,任何计划都必须有健康的身体去扶持。注意你本身的健康吧!

《人生密密缝》是一套每个妈妈都应该去看的戏。非常认同影片评价!《新女友》也是类似的戏。

According to the discussion I have with different breeders and the show owners around Jalan Pasar, depends on the type of Betta fish, arrival of new stocks depends on the prices. Tuesday or Thursday (MYR 2.50) and Thursday or Saturday (MYR 5.00/6.00). Do not that more of these cheaper Bettas are rejected low grade fish. On a rare occasion you will have higher grade Bettas like Koi or Dumbo which is priced around MYR 20.00 - MYR 35.00.

Go for those less than MYR 10.00 if you're starting to raising Betta but don't want to fork out a lot of money. When I saw those kids buying these Betta with their clueless parent, definitely those Bettas will not survive long. Betta are quite sensitive to water parameters. Without keen monitoring, most of these bought fishes will die of infection due to bad water quality.

Forgot that I supposed to review my weekly steps walked. Hence, going to start this week with reflection and review. The plan is to try to walk 6,000 steps per day. This is doable if you walk more in the office, drink more water, eat more fruit, and go to rest room more often. You can gain more steps if you walk to eat your lunch and travel by train instead of motorcycle. A minor changes in your daily habit can have a significant improvement of total steps walked.

This week progress was quite good. Good if we can have 6000 steps per day. That the essential bare minimum. If you can hit 10000 steps per day that would be nice but that is optional. Experiences have shown when you walked more step a day before, you should let your body rest the following day. Awareness is the key here and that is the plan for next week. Compare to last time, aware of your weight and food intake. In short, move and don't stay stagnant.



Yes, it's almost one month into the year 2018. What are you looking forward to? What are you new year resolutions? CrushEntropy, my friend.

Steve Yegge left Google for Grab (via Reddit) Interesting comment about his guitar playing skill. Joke aside, we do need more vocal people to voice out somehow. I believe he is right, on the consumer side, Google is not really gaining any advantages over the competitors.

Surprising and shocking. I wondered if the video have been viral enough, what would the manufacturer of the said "healthy" drink would do? Lawyer up and sue?


This Week I Learned - 2017 Week 48

The usual last week post or something from the archive.

Down with fever and flu. At certain age, you really need to love your body as much as possible. On the bright side, I'm almost off the grid for the past few days.

The Best Monitor for Programming: A Cheap 40″ 4K TV. (via HN) Not really a good choice if you want to reduce eye strain and myopia. Also, you will need to have a good distance in order to get the actual benefits. However, definitely not for me. A large screen size is suitable for people who love to have multiple opened windows at the same time. I always prefer one window at a time.

The Diderot Effect. We all will experience this someway or another. Picking up a new hobby, for example, photography. Well, not only you're just getting the camera body only, you will purchase the whole system (complementary accessories), which includes bags, lens, filters, books, magazine, and etc. The constant upgrades will lead to endless hoarding. James Clear have recommended a few ways to manage Diderot Effect. The main take away are reduce exposures, prevent impulsive purchases, self-imposed constraints, and downgrade. The last strategy seems interesting. We're seldom downgrading on stuff we owned but constant pursuit for latest greatest.

CS007: Personal Finance For Engineers (via HN) Worth every minute of your time to go through the whole thing. We have been taught and educated on different types of mathematics but not really on finance. This should be the compulsory subject for all students. Start them young and early.

Emulate the SRV tones? Forget the about the budget and get his signature guitar, amps, and pedals. Or without bursting the bank, something more affordable. While having similar gears does getting you closer to emulate original tones, do know that how a guitarist play, hold, pick, and grip guitar have a huge influence on the tone. Furthermore, post processing have a big impact on the final sound and tone. However, something related, PixxyLixxx gave a good advice on why you should have a limit on how much you can spend on a guitar (in his case, is USD 300 with certain exception). Unless you're freaking rich, when you past certain age, different priorities in life set in. You should put the extra money in your kids college funds or fixing your house.

This Week I Learned - 2017 Week 44

Last week post or the past stuff.

SMS bulk notification is a sunset industry right now in MY. I doubt people are still using SMS for communication except to receive notification from the banks, telcos, or something else. Companies or these value-added service providers are struggling to sustain their business and finding ways to pivot their core business to something else. However, I still fail to see how they going to evolve from there.

I've been travelling to a certain part of KL these days and every time I'm around that area, these service providers will spam me with SMS message relating to the services in that area. Suspected my telco provider have been sharing my preferences and location to these third party value-added service providers. Not to mention recent mobile data leaked.

Diet change seems to work somehow. Will continue with it and keep monitoring the progress.

Recent events, unfortunately, reinforced my prejudice regarding certain beliefs. The research summary shown below (emphasis added) best described it. Lesson learned. Move on.
"People are quick to change their moral values depending on which rule means more cash for them instead of others, a study shows. The researchers conclude that the "Pursuit of self-interest is tempered by the constraints of coordination. People seek not only to benefit themselves but also to persuade other people that they are morally right in doing so."
The "Rules' of Writing. (via HN) Definitely agree with the minimize the usage of adjectives and adverbs or better, kill it. Overuse is a sign of lazy writing, for examples:
"The man moved slowly."

Where you can rewrite using more vivid and stronger verbs.
"The man sneaked."
"The man strolled."
"The man limped."

Mastery is the side effect of deliberate and constant practices. You may or may not achieve it but nevertheless, if you enjoy doing it, then just continue as it. You can always start with technical writing.

What Python stack should you use? AWS Lambda, Python, AWS Cognito, Postgres and ReactJS. Interesting conclusion that goes against the bare-bone frameworks like Flask or Bottle.

Nature is both brutal and weird. What will happen when these eggs grow into mature adult bettta fish? (emphasis added by me)
"During and after spawning, the male uses his mouth to retrieve sinking eggs and deposit them in the bubble nest (during mating the female sometimes assists her partner, but more often she simply devours all the eggs she manages to catch). Once the female has released all of her eggs, she is chased away from the male's territory, as she will likely eat the eggs. If she is not removed from the tank then she will most likely be killed by the male."

This Week I Learned - 2017 Week 28

Last week post or something from the archive.


Another long and outstanding issue resolved. While I'm not partially involved but glad it has finally been settled in a mature and non-violent manner. Long story short, is a long story. Nevertheless, everything back on track and are quite a few things I need to follow up and get it done by this year. Half year have gone and not much time left before the end of 2017.


When you're switching character set and column collation in MySQL, you will encounter certain limitation of the index length of Innodb storage engine, the error of 'The maximum column size is 767 bytes.' . There are three ways to resolve this issue. First, you resize the column size from VARCHAR(255) to VARCHAR(191). Second, you resize the the table index length. Third, you switching the storage engine from Antelope to Barracuda and then switch the table to dynamic row format. Similarly, MySQL utf8 to utf8mb4. This post summarized three essential SQL statements needed to do the migration.

MySQL, while is a pile of mess, is a good case study of Worse is better. Likewise, same goes to Craiglist. Say you want about the site, which still stuck in the early 90 design, but still making profit until this day. Sometimes, good enough should be sufficient.


Everyone's code basically sucks, including yours. Honest insight on what you will learn after many years into software development. Importantly, don't get too comfortable in any job. In the end of day, you're delivering software to solve problem, is all what the stakeholder wants, nothing more and nothing less. While some have more pessimistic view of moving to management instead of development and managing up (some said it's overwhelmingly cynical or Machiavellian).


The hierarchy of 'Troubleshooting Software Problems. Probably the best thing I've read so far on how to troubleshooting any problems. The hierarchy of problem as shown below:
  • data
  • code
  • workflow
  • design
  • architectural
  • team
  • project
  • organizational
  • leadership / existential

Is our eating habit, and thus eating habit influenced by "the array of microscopic organisms that live inside our intestinal tract." The whole thread was an interesting read with comments backed by scientific research. Maybe gastrointestinal microbiota is manipulating our eating behaviour. Which leads to the new type of obesity treatment through gut microbiome transplant. In other words, taking care of your gut is one of the essential way to stay healthy and fit.


Shelving and checkpointing in Subversion. It has been so long that finally someone look into adding local commit support. However, it's just the initial stage although there are many design documents available.

Where We Started. The movie and the guitar song. The former is a low budget movie with witty dialogue and the later made me want to pick up guitar again.

This Week I Learned - 2017 Week 26

Last week post or browse the archive of mindless ramblings.

Week 26 of 2017. We've finally reaching the half part of the year. So many things to do, so little time available.


"Eat food, not too much, mostly plants.". Avoid white processed food or any kind of fast food. Sounds simple right? Hard for us to follow. With a tendency of bridge, especially during dinner and sedentary life style, I doubt anyone have the time to eat a proper good healthy meal. What can we do then? Read discussion on forum and read scientific papers, and develop your own methodology. Good example of such research. However, some studies were paid studies to fit certain agendas, checking for a reputable sources is quite difficult due to signal to noise problem. Furthermore, most discussions are just personal anecdotal, which you know, is just a sample size 1 observation or N = 1 situation. To reduce all these noises and personal anecdotal, do your own research and refer to few reputable sites like NHS Choice and Harvard Health Online (paid subscription). Everyone mileage may varies, as we tends to trust our body and conduct N = 1 experiments on ourself.

Be careful when going to any chiropractors, don't let anyone have a quick jerk of your head. Better still, see an orthopedist with chiropractic knowledge.


MySQL, seriously, what an effed up database system. Conversion from one character set and collation to another was rather tricky. Resolving "ERROR 1071" was not as straightforward at it seems.


Interesting idea. Just focus on 3 things. 3 things per day, per week, per month, and per year. Experience have taught me figuring out which three things is the hardest part. We're constantly fighting over on the should and want.


This is what happened when an organizational system have been practiced rigorously. Way overboard for my taste. But different people have different working style and culture. While it's good to go for simplicity with an analogue approach, but managing index cards the manually way is just way too cumbersome. Pen and paper is good when you don't need to archive the information and can simply throw it away.

Meanwhile, the post on electric typewriter and reading environment gave me an idea on converting my Raspberry Pi into one digital typewriter. I just need to setup my writing environment with a monitor, mechanical keyboard, a mouse, and a good reading lamp. Just fire up the tiny box and start writing. Jot down what ever come to you without any prejudices and judgement. And eff grammar.


Why process is important? Cognitive errors more likely to happen than procedure errors. Stick to the process.


Fanny pack and Underbone (kapchai). These are like almost like everyday carry (EDC) and yet I don't even know the actual names.


Seeking job fulfillment? Depends on what you want or to sugar coat it, whether its align with you moral and ideological compass. Some don't dream big and content with their role, even through with minor contributions. Some based on ideology. If you want better pay, you will likely to end up with job you don't like, just like 98% people out there. Or maybe you should take a different view, the job itself is just your bread and butter, use the money to do something you find more fulfilling. Provided that you save your income aggressively like 25 times annual expenses.

Something of similar nature, how not to bring emotion from work back to home or how do you decompress after work?


Another day, another weird validation rule when using Vim and LaTeX.


GNU GPLv3 turns 10. What a long way to go since the first decade. Like it or hate it, this license have significantly changed the whole computing industry, especially free and open source software development. Without it, we are still at the mercy of proprietary licenses in all our computing devices. If you ever use any free and open source software and benefits from it, it's time for you to help out, sign up and be a member!


"TDD failed for economic reasons, not engineering ones." This is so true for legacy system when you want to add new feature but don't want to break existing stuff.

This Week I Learned - 2017 Week 25

Last week post or you can explore the archive.

Writing and nothing but writing. Imagine starting from 8 in the morning until 12 in the night, minus the eating time and occasionally short breaks, you have to write up something to fill the remaining 12 pages. Staring at the monitor for 16 hours non-stop will definitely depleted you and causing much stress, especially to your eyes. The sudden and urgent feedback caught me by surprise. Totally messed up my daily routines. The aftermath of this last minute changes is you have become wordy, like one of those week I've experienced before. Therefore, this week blog post will be a bit wordy than usual.

One hard lesson I've learned during this writing period, reading and lots of reading is essential for writing. There is no way for you to churn out anything fast, if you don't even have a clue on what you're going to say. Want to be a better writer? Be a better reader. Reading a technical paper and a fiction requires different strategy. The former needs a systematic and structural way of extracting information. The later, you just need to use your imagination and indulge with it.

Another one. Statistics is very important, far more practical and relevant than other branches of mathematics. You never know when you going to need it, but when you do, you really do! Time for relearn and pick up some statistics.

The next lesson? I think I finally and partially understand what the heck is methodology, which in short, a set of practices or procedures. To explain in another way, a step-by-step procedure on how you going to tackle a particular problem. Particularly, you have to explain when, where, and how you're going to carry the procedures. It changed how I read, understanding, and absorb information. In the end, all the details, some ways or another, are transformed into a flow chart.


Back to the regular weekly ramblings.

Via Reddit. World oldest gymnast, Johanna Quaas, 91 years old to be exact. Nothing but good genetics, healthy and active lifestyle, be independent, and how to age gracefully. There are so many ways your body will let you down and kill you when you age. Genetics aside, which is out of our control, this is definitely doable, you just need to have the persistent and patience to do it. Seems that cycling is preferable than running, if you don't want to damage your knees due to running.


Do you plan your next day ahead? I've been facing the same problem in organizing my life. It's a long tedious process of trying different organizational systems (Four Quadrants / Eisenhower BoxGTD, Bullet Journal, and Pomodoro) to see which one sticks. Typically, nothing stick for a long time, after a while, you will drifted away and back to your old self. The main issue procrastination. You're aware of the priority, but don't feels like doing it. Then it dawned to me that time management is actually mood or mind management. If you need to to something important, schedule it at the time where mentally you're most alert and aware. For example, early in the morning when you first woke up is probably the golden hour of productivity.

Maybe the mentioned systems are way complicated as it can lead us to overly micro planning. Remember, there is no one true system, it's a mixed of everything with some adaptation. Why not going analogue and low tech with a simple pen and paper. Jot down your to-do list, prioritize, try to get things done within that day will work. Not every day is a perfect day. Accept it. Not everything will be completed within that day. Reschedule the unfinished tasks to the next day. For more refinement, break the day into four sessions of morning, afternoon, evening, and night.

Regardless how you optimize your day, the first thing is to plan ahead, way ahead like life goals from 6 months to 30 years. The longer the planning, the more you will aware that most things don't matter that much in life eventually. I agreed with the poster's four assumptions, especially that "productivity is getting the most important things done" and "most people don't have that many things they truly want to accomplish.".


Classic Papers: Articles That Have Stood The Test of Time. Collection of ten most cited papers from different area of research. Unfortunately, only from 2006. It would be nice the paper can be extended from far longer before 2006, say from 1900. Interesting found was this paper, Who should fix this bug? where the author was using machine learning to semi-auto assign a reported bug ticket to the a developer.


LaTeX, where what is hard is easy, and what is easy is hard. Editing LaTeX file with Vim? Plenty of errors that you probably needs to amend to make it go away. Generating PDF file and the page dimensions seems off? Readjust the page margin dynamically. Sigh. No matter how much I love typesetting, the hassle and effort of tweaking the layout is not worth the time.


When using Git, branching is easy and cheap. Two things that I need to use quite often when merging changes from different branches. First is create more throwaway branches and squash merge using the `--squash` parameter. Second is cherry picking using the -n parameter. Both ways do merge but not commit the changes.