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.

Betta Spawn Log : BSL20181005 : HMPK Super Yellow (S) x HMPK Super Yellow (S)

Another sibling pair we bought and this time, a super yellow pair. It's very hard to get a super yellow HMPK and moreover a pair. We're tired to look around for a super yellow HMPK and might as well bought a pair and breed on our own. The plan is to breeding multiple generations of Betta pair to create a lineage.

Male: HMPK Super Yellow (S)
Age: 3+ months
Temperaments: Curious and active.
Size: Small (3.0cm body only)
Grade: C

As you can see below, not a good grade and the fish is quite small in size. However, since SO like this male Betta, we decided to get this.


Female: HMPK Super Yellow (S)
Age: 3+ months
Temperaments: Curious and active.
Size: Small (3.0cm body only)
Grade: B

More nimble and aggressive than the male Betta. Probably the healthiest female we've seen so far.


Log Notes
2018-09-23
We went to a Betta farm and bought this pair of super yellow HMPK siblings. SO was excited and always wanted to breed a true super yellow pair since the passing our yellow HMPK.

2018-10-02
Conditioning process started but we put the pair of fish into separate jar but both can observe each other.

2018-10-03
We put the female Betta in once we felt that the male Betta have already built a large bubble nest. Within hours, both fishes were seen mating. We removed the female Betta immediately after the male Betta was seen chasing it.

2018-10-06 (1st week)
Fry were swimming vertically and started to feed on BBS. SO decided to keep the male within the breeding tank since this male Betta were caring and not aggressive.

Retrospection
1/ Our visit to the Betta farm reinforced that Indian Almond leaf is crucial to maintain a healthy Betta fish, especially for breeding.

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 36

Old posts from archive or something from last week.

Why SGI's Onyx was such an attractive and desire visual battle station during the 90's? (via HN) Yes, the size was overwhelming and looks like a mini fridge (or an espresso machine) but its graphical processing was the best during that period. Looking back through their history, all SGI's machines were always powerful but damn expensive. Sadly they should have created a consumer version instead of focusing on high end market which leads to its slow demise.


Is Nikon Z6/Z7 worth it? No, pricing and features (compare to Sony equivalents) and limited lens available making it a less suitable choice. Unless you're professional or prosumer photographer who prefers Nikon's ergonomic body and wants to reuse all your existing Nikon lens collection (however, autofocus only works with AF-S or AF-P lens). Otherwise, for normal hobbyist, maybe it's wise to wait for budget or entry level models like Z3/Z4/Z5 or something from Canon to release it's own mirrorless system to join the competition. Maybe you should just stick with your mobile camera, you don't need the latest greatest camera anyway.

Do you have any good advice on writing? Write fast, throw away everything, and take the conclusion as introduction.
"My English teacher used to say “when you have to write an essay, write a first version. Then throw away everything but your conclusion and use that as the introduction of your real essay"
What is the one thing you should be aware when using React Router? Check the version of the installed package first. There were some differences on how the router rules work between version 4 onward and before version 3. I was stuck with a router problem for a while before I realized that I'm looking at legacy documentation.

How to sort NULL column at the end of the queried result in SQL? The simple answer (which I always forgot) is shown below. This is compatible with both PostgreSQL and MySQL.
ORDER BY date IS NULL, date DESC

Why we need to use generics in TypeScript instead of `any` type? To quote from the official documentation (emphasis added).
While using any is certainly generic in that it will cause the function to accept any and all types for the type of arg, we actually are losing the information about what that type was when the function returns. If we passed in a number, the only information we have is that any type could be returned.

Instead, we need a way of capturing the type of the argument in such a way that we can also use it to denote what is being returned. Here, we will use a type variable, a special kind of variable that works on types rather than values.
In short, we want to know the return type of a generic function.

This Week I Learned 2018 - Week 35

The previous post or something else from the archive.

How do you increase your monitor resolution if the default resolution was not sufficiently enough? As I was reorganizing my battle station, the old monitor resolution was off due to changes in the display adapter name. These steps have to be done as the display driver will not set to the correct resolution due to old VGA adapter.
$ cvt 1280 1024 60
# 1280x1024 59.89 Hz (CVT 1.31M4) hsync: 63.67 kHz; pclk: 109.00 MHz
Modeline "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
$ xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
$ xrandr --addmode VGA-1 1280x1024_60.00
$ xrandr --output VGA-1 --mode 1280x1024_60.00

While the new UI in Gnome's display settings have been polished and updated. However, it still can't detect or add the correct solution for each display adapter. Is there a way to better manage and automate this process? Yes, this is possible through autorandr and pool-xrandr.


How does USB upstream and downstream ports works in Dell monitors? There are two types of connection. First, the type B connector which connects to your PC to get its power source to your USB hub. Second, the remaining type A ports for you to use for other devices. (See screenshot captured below, credit to Psycogeek). Now where is that USB Type B to Type A cable?


What happened when you start another culture in a remote island? Interesting documentary on Cocos (Keeling) Islands.

This Week I Learned 2018 - Week 34

Last week post or some past posts.

How many books I can read this year? Who cares? Just read the book already. (via HN) Different types of books require different reading strategies. Should you read deeply (slow) or lightly (skimming)?

What can you do when you obtain large amount data from city council? See effort (via HN) by Matt Chapman where he reduced parking tickets through data munging through Freedom of Information Act (FOIA) request from city council's parking system. What about FOIA for MY? Yes, there is something similar but only for both Selangor and Penang states.

Do you hates your job at 35? (via HN) Contrary to the general HN's opinions, work is there to pay bills but this guy seemed to have figure things out. And fortunately, as a hobbyist developer getting paid, I still foresee myself doing this for many coming moons (there are still so many pending items in the bucket list). One thing for sure, you just need to take care of your health.

Meanwhile, how does an old programmer's resume looks like from 1980? Something like this, a simple cover letter and one page resume.

Betta Spawn Log : BSL20180824 : HMPK Blue + Black (S) x HMPK Blue + Red (S)

It has been a while since we last started our breeding project. Instead of choice, we're thinking to breeding bluish HMPK Betta. Out of the seven pairs we've tried to breed, only this blue pair managed to mate and spawn.

Male: HMPK Blue + Black (S)
Age: 6+ months
Temperaments: Normal.
Size: Small (3.0cm body only)
Grade: B

Typical HMPK male that you usually found in aquarium store. We were quite disappointed when we received the fish. For the price we've paid and expecting something better from a reputable Betta breeder, the quality of the male was a lot of be desire.


Female: HMPK Blue + Red (S)
Age: 6+ months
Temperaments: Passive.
Size: Small (3.0cm body only)
Grade: C

One of our own breeding project. Nothing particular special but seemed to be quite futile and bigger than more female Bettas in the community tank.


Log Notes
2018-08-21
Conditioning started for both fishes. Contrary to other breeding method, we just threw both fishes into a breeding tank and hoped both fishes will fall in love, mate, and produced lots of small fry.

2018-08-24
The pair mated and breed.

2018-08-26
Fry were found swimming vertically. Immediately removed the female Betta.

2018-08-30
No sure why, but the male Betta were seen swimming back and forth against the glass. Nevertheless, we decided to remove the male Betta from the breeding tank.

2018-09-08 (2nd week)
Fry were growing well even though this was a small spawn, roughly around 10. The BBS given can last for two days and we saw significant growth.

2018-09-15 (3rd week)
Noticeable growth for most of the fry except maybe one or two. Since this spawn was too small, we're contemplating whether to move it to smaller breeding tank.

2018-09-22 (4th week)
90% water changed and cleaned up the breeding tank. To reduce water changes, we have added some aquarium plant (can't find the name yet).

2018-09-29 (5th week)
Nothing special observed.

2018-10-06 (6th week)
Growth have been quite slow. According to the growth table, by sixth week, the fishes supposed to be around 2cm or more. What we observed was all fishes were around, on average 1cm or less. We are thinking about changing the diet or feed those fishes more frequently, from 2 times to 3 or 4 times per day.

Retrospection
1/ Condition before breeding is quite crucial if you want the Betta couple to mate successfully. Feed them live food a week before pairing both fishes.

This Week I Learned 2018 - Week 33

Last post or some random posts from the archive.

Do you need standups? Maybe you don't. (via HN) Some comments in HN resonate with me based on the experience of the implementation. Maybe is just me, but it does feels like cargo cult software engineering. Team culture, business culture, or management issue? Execution of the practice is still al lot to be desired. Interesting development days ahead.

What are Thonet & Vander speakers like? The sad case in MY here is that there is no way for us to purchase any good budget speakers. The funny thing is that this particular brand Thonet & Vander is readily available. Some local distributor have brought this in (why that particular distributor did no brought HiVi Swan to MY?). Nevertheless, as the comment suggestion, this is one of those OEM manufacturer which use European brand names to implies good quality. Back to the question, is this brand of speaker good enough? My personal opinion, mostly are multimedia speakers (something you bought for your kids) and Amazon's reviews didn't justify anyone to fork money on it (there are other brands exists in similar market, Edifier). Unless we have good review from NO Audiophiliethis comment shares my sentiment.

Which "budget" stereo amplifier to get? It's between Onkyo A-9010 and Marantz PM5005. Price wise both are the same and it's just the sound signature. For A-9010, I'm not sure that I need to replace the Samwah capacitor to Nichicon gold tune capacitor. However, different country have different version. However, I'm not sure the model sold here is EU (digital inputs and normal capacitors) or UK (better capacitors, no digital input, and Wolfson WM8718 DAC) version. Having digital input is good if you want to hook up to Chomecase Audio via Toslink input. Also, the loudness button (which increases sounds at low volume, good for classical music like Boléro) piqued my interest with the device.

Why not stick to amplifier like SMSL SA50 which is cheaper? Those class D amplifier is truly budget amplifier which missing quite a lot of features compare to amplifier like A-9010, a class AB amplifier. Furthermore, the output rating have been inflated. Class D amplifier should be sufficient enough for a small room.

Speaker wise. Just pair it up with a floor standing speaker if you don't want to invest a sub-woofer. The speaker's bass should be sufficient enough.

Encountered this error "Odd number of elements in anonymous hash..." and took me a while to figure out what went wrong with the the code. It turned out that Perl's hash will accept single element Hash without a key-value pair. Hence, the warning. I was surprised that this is not a syntax error. The example code below. See if you can identify the issue. Hint, the `foobar`. There is a good explanation at Stack Overflow on this warning message. Turn on warnings people!
my $result = $api->GetSomething({name => {'foobar'}});

This Week I Learned 2018 - Week 32

Post from previous week or from the archive.

真的服了,句句都是绝句。第一次分手可能是对方有问题。第二次分手可能你们都有问题。第三次分手估计你肯定有问题。第四次分手表示你没搞懂问题。第五次分手表示你不改善问题。

What are the available wild Betta species? We're looking into Betta Brownorum as our next breeding project. Since this is a wild species, we can't find any stock from local breeders. It seemed you will have to capture it from the wild, in Sarawak.



Why there is a sign in Perl's hash key? Legacy reason.

Getting excited when buying stuffs (the highs is in the anticipation and it's more fun planning a vacation instead of the actual vacation) and have buyer remorse later? There is a quick tip on handling that. Take the amount you're going to spend and pay off any pending debts or loans. In the end, it's a divert and replace strategy. Any impulse purchase can be put off (delay strategy) if you set a goal before succumb to your materialistic needs. For example, lose a KG, indulge yourself into the stuff you desire for so long. Remember to reward yourself as you deserve it. Note that this is applicable to stuff and not really experience, especially spending on good experience with friends and family (moderation applies here as well). Another way, love shopping? Why not spends money on investment. Shop investment, not liabilities. Instead of getting the Nike shoes, buy Nike stocks. You have to ask yourself, which is more motivating? Watching your bills accumulates or your saving grows?

How to spend $0 each day? Meal prep. My friend. Meal prep.

How Europe Learnt to Swim? Like any forms of knowledge, observation, self-learned, trial and error, consolidation, and sharing of knowledge. I'm quite surprised that most island inhabitants can't swim properly to save their own life. Seriously?

What cloths to keep and throw away when cleaning up your closet? One key question to ask yourself is "If I saw this at the store right now, would I buy this again?" Throw away the cloth if the answer is no.

What is JSON PATCH? A combination of JSON and HTTP PATCH. You will see the HTTP content-type have been set to application/json-patch+json.

What was your most 'can't-put-down' book that you've ever read? Here are the list in random order. Overwhelm by the list? The quick way to filter out is to read the first few pages and if it caught your attention, proceed ahead. If not, ignore.
  1. Watership Down by Richard Adams (discussion)
  2. One Hundred Years of Solitude by Gabriel García Márquez (discussion)
  3. The Historian by Elizabeth Kostova (discussion)
  4. Night Watch by Terry Pratchett (discussion)
  5. 11/22/63 by Stephen King (discussion)
  6. The Book Thief by Markus Zusak (discussion)
  7. Killing Floor by Lee Child (discussion)
  8. Lonesome Dove by Larry McMurtry (discussion)
  9. Jurassic Park by Michael Crichton (discussion)
  10. Neverwhere by Neil Gaiman (discussion)

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 30

Last week post or something random from the past.

Is MySQL an ACID compliant database? On paper yes, but in reality, not quite. For example, database dumping using mysqldump have an issue where did not backup tables with proper single quote escape. This was quite a tricky bug I've encountered where MySQL silently ignore inserting certain records due to quoting issue. Only when certain records were missing from the application, I only realized that database restoration did not work as intended. I wouldn't have figure this out if not for the need of the record. In the end of the day, a workaround was added but unfortunately, wasted a whole day to track this down through numerous dumping and restoring the database.

How do you organize/track your personal goals? Pen and paper, nothing more and nothing less. Write it down and make it happen. Off course, the usual productivity systems like SMART or GTD but to what extend? Sometimes you just need to chill and don't pressure yourself so much.

What is PERMA? Basically this represents an acronym of a theoretical model to achieve well-being or happiness by Martin Seligman in the field of positive psychology. The components of the model are position engagement (there is a difference between pleasure and enjoyment), engagement (in the 'flow', they said), relationships, meaning (doing something other than yourself), and lastly accomplishments. Does the application of this model in online learning platform have an implication on learning ability of these online learners?

What is one anime adaptation worth watching? Monster by Urasawa Naoki. I was quite late to discover this anime but the the style and story line was worth it and way different from the conventional Shōnen manga.

This Week I Learned 2018 - Week 29

Last week post or something else from archive.

纯洁,值多少钱?

What's your philosophy when building software? "Make it work. Make it work right. Make it work fast". There is no such thing of simple, correct, and fast. Why, there is no such thing as simple requirements or requests. More and more features will be added or hacked upon existing hacks.

Having trouble remembering Vim's key combination? Look no further, just print out the Vim Cheat Sheets.

Why use the Zebra fish (Danio Rerio) in research? Besides sharing 70% genetics with human, this species of fish also fast and easy to breed. Thus, a good medical research model (the new lab rat). No wonder, it's quite prevalent in medical research. There even exists ZebraBox, a monitoring enclosure to analyze the behaviours of this fish.


And you will be surprise that breeding Zebra fish for medical research is totally different from breeding in the wild. Breeding process is automated and controlled.



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.

Betta Fish Growth Table

When breeding Betta fish, how do we know that the Betta fry is growing at the right rate? In the Interweb, most web sites will point to this growth chart of the Wayne's Betta pages. However, the measurement used in the page was not in metric system and it's always hard for us. Hence, we used the information from the page and converted it to metric system.

Note that this growth rate is based on normal Betta fish (Betta Splendens) and may not be suitable for Giant Betta which have different growth rate than normal Betta. Also we've extrapolated the growth rate for week 12.

This Week I Learned 2018 - Week 27

Last week post or something from the archive.

How does we diagnostic aquarium tropical fish diseases? There are many ways and this diagnostic website (there is another one with better graphic) provides a quick way to identify the actual disease based on several symptoms. Aquarium Co-Op recommends three medications besides all quarantine any fishes into this aquarium store. MSR also used similar way. We're a bit concern on the usage of Erythromycin (which is an antibiotic) as it may cause antimicrobial resistance. Moreover, we're not sure about the side effect of long term exposure towards human to this medications. Unless you're managing a aquarium store, it's best to use natural ingredients (garlic or Indian Almond leaves) instead.

Buying new headphones? I've been asked this question numerous time for the past week. Just visit Audio Guide. One thing I've learned is that budget aside, you can pick the head phone based on different sound signatures such as V-shaped, bright, neutral, dark, warm, and mid-forward (names can be different). I was wondering how does this apply to Hi-Fi system? More posts on this in coming future regarding these audio signatures.

What sound track for testing your audio equipment? I recently rediscover Yosi Horikawa. His Vapor album is a good start. A mix of nature sounds, human voice, and music mixed together.

Can you suggest one way to improve your writing? Vary your sentence length. Gary Provost gave a good example in his book "100 ways to improve your writing" as shown below.

Monotonous 5-words sentence.
This sentence has five words. Here are five more words. Five-word sentences are fine. But several together become monotonous. Listen to what is happening. The writing is getting boring. The sound of it drones. It's like a stuck record. The ear demands some variety. 
Varying sentence length.
Now listen. I vary the sentence length, and I create music. Music. The writing sings. It has a pleasant rhythm, a lilt, a harmony. I use short sentences. And I use sentences of medium length. And sometimes when I am certain the reader is rested, I will engage him with a sentence of considerable length, a sentence that burns with energy and builds with all the impetus of a crescendo, the roll of the drums, the crash of the cymbals--sounds that say listen to this, it is important.
Picking up React? What the best way for seasonal developer to start? React from zero (via HN). Note that web components (custom HTML element) may seemed to overlap (some part of it) with React.

Is this capitalism? Regardless how much you earn, there should be a threshold amount where you will reach an equilibrium of having enough and not being a slave to your money.


How will the 2018/2019 NBA season looks like? This comic said it all (via 老崔愛叭噗). The weird thing was the NBA free agency was way more bizarre and shocking than the FIFA world cup. Talked to a few people and the general consensus was that FIFA this time was quite boring.

NASA and FBI, what the difference? The former is an abbreviation where you can pronounce it as a word. Meanwhile, the later is an initialism or alphabetism where you pronounce it as individual alphabet. 

Thinkpad X230 : Updating BIOS through Ubuntu 18.04 LTS

As far as I remembered, I've never really updated any BIOS for any machine before. Due to some weird circumstances that caused my to stuck at a place for long period, might as well update this lappy's BIOS while waiting. Based on the Think Wiki site, there are several ways to update BIOS in GNU/Linux. Below notes were my experiences using both method.

First thing first, we need to check the BIOS machine of our machine so we can verify whether we need to update the BIOS.
$ sudo apt-get install dmidecode
$ sudo dmidecode -s bios-version
G2ET99WW (2.59 )

Next, we need to download the bootable ISO we can can update the changes to the BIOS. Go to support.lenovo.com, search by your machine model and find the relevant files. See screenshot below.


Download the ISO file and verify it with the checksum.
$ md5sum g2uj29us.iso
396cdaedf7d8871428d249f1be0c5b2d  g2uj29us.iso

Since I've never try booting an ISO through grub, hence we will try this method.
$ sudo apt-get install grub-imageboot
$ sudo mkdir -p /boot/images
$ sudo cp g2uj29us.iso /boot/images/

Update Grub to detect the ISO image.
$ sudo update-grub 
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when 
GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.15.0-23-generic
Found initrd image: /boot/initrd.img-4.15.0-23-generic
Found linux image: /boot/vmlinuz-4.15.0-20-generic
Found initrd image: /boot/initrd.img-4.15.0-20-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
Found memdisk: /memdisk
Found iso image: /boot/images/g2uj29us.iso
done

Restart your lappy and press F12 and boot through the USB thumb drive. However, this method did not work as the updating process froze and can't proceed ahead. Since, nothing was happened after 30 minutes, I've decided to proceed with BIOS updating through USB thumb drive.
$ sudo apt-get install genisoimage
$ geteltorito g6uj14us.iso > biosupdate.img
$ sudo dd if=biosupdate.img of=/dev/sdb bs=1M

Plugged in the USB thumb drive and try again. Read and follow the instruction, plugged in the power adapter. Select the second option, `2. Update system program` and after reboot, if you see below screenshot, then BIOS flashing was working as intended.


Double confirm that the BIOS have been updated.
$ sudo apt-get install dmidecode
$ sudo dmidecode -s bios-version
G2ET99WW (2.73 )

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.

Betta Spawn Log : BSL201806024 : HM Orange + Red (S) x HM Dirty Yellow (S)

It has been a while we've another breeding project involving two HM. Timing was right as the male HM was making bubble nest and the female HM was fertile with eggs.

Male: HM Orange + Red (S)
Age: 3+ months
Temperaments: Normal.
Size: Small (3.0cm body only)
Grade: B

While we have quite a few HMs, especially own breeding project, but there is only a partial orange and red colour HM. While this HM is quite young, this male Betta have been building bubble nest non-stop for the past month.



Female: HM Dirty Yellow (S)
Age: 4+ months
Temperaments: Normal.
Size: Small (3.0cm body only)
Grade: C

This female Betta was part of a pair of yellow HM we bought for breeding. Unfortunately, the mating didn't ended well as both Bettas were fighting with each others and don't want to mate. As you can see from photo below, the female Betta's fins were badly damaged.


Log Notes
2018-06-23
We decided to put in another female Betta. The existing female Betta was kept in the breeding tank and isolated in a plastic bottle. Having two female Bettas will increase competition and lead to successfully breeding.

2018-06-24
Mating completed during early morning around 4 a.m. We removed the female Betta around late evening as the weather was too cold and temperature of fresh new aquarium water was too low.


2018-07-17
Almost one month and the fishes were growing well. Quite a large spawn and we're anticipating the outcome of this spawn.

2018-08-10
Instead of the normal rectangle sized aquarium, we have put the fry into the square plastic container. Water changes were done two or three days interval. Good thing was the father Betta was healthy and active without any sickness.

2018-08-18
Moved the spawn and combined with BSL201806011. We have started to combine several spawn to save space and reduce our water changes work.

Retrospection
1/ Have to be careful with frequent water changes as certain small size fry may not survive the stress of sudden water changes.

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 24

Previous week post and from the archive.

When you have so many fishes died and so many was born in the same week, it did bring a whole new meaning regarding the circle of life. However, looking closely, it's simply just the incorrect water parameters issue in multiple aquarium tanks.

How the heck we return an array reference when using Perl's map to manipulate each element in the array list? The answer is quite straightforward, using bracket `[]` to wrap the list in array context.
use Data::Dumper;

my $items_in_lowercase = [ map { lc($_) } ('Foo', 'Bar', 'Baz') ];
print Dumper($items_in_lowercase);

What are the available core modules in your Perl installation? Use `corelist`, a command line front end to Module::CoreList to find out.

How does a Perl's coding standard documentation looks like? The SEI (Software Engineering Institute) Cert Perl coding standard not only well organized, it's also well written. Really put some software companies own documentation to shame. To be fair, this is from SEI, yes, the one that introduced CMMI (Capability Maturity Model Integration).

Writing and releasing free and open source software? Which license to choose? Pick one that suite you then.

Are you working on interesting technical problems? "You might as well have asked who among us won the lottery." The top post has the best answer I've read since so long. The whole discussion not really about the technical problems but more towards your attitude towards it.

How do you handle undefined methods in Perl? AUTOLOAD or Autoload::Can, or Mojolicious' AutoLoader? Either ways is still a hack somehow or another when compare to other programming languages implementation.


Betta Spawn Log : BSL201806011 : HMPK Black Dragon (M) x HMPK Black Dragon (M)

Yes, another attempt of breeding project with two Black Dragons, this is similar to the failed BSL20180506 breeding project. For this project, we're using another male Betta but with the same female Betta. All these Bettas were purchased from the same breeder and were from the same spawn (siblings).


Male: HMPK Black Dragon
Age: 4+ months
Temperaments: Normal.
Size: Small (3.5cm body only)
Grade: B

Compare to its sibling in BSL20180506, this male Betta is more silverish where the other one more bluish. We don't pay much attention to this male Betta so nothing much we can describe about this one compare to the other more aggressive male Betta.



Female: HMPK Black Dragon
Age: 4+ months
Temperaments: Curious and active.
Size: Small (3.0cm body only)
Grade: B

The same female that did create a big spawn. We let it rested for a month instead of the usual two weeks before our next spawn. Other than minor bruises, the female Betta looks perfectly fine and was actively swimming around.


Log Notes
2018-06-11
Egg was seen on the bubble nest. But we're not sure but suspected that mating did happen before. Will wait a few days to see if any fry were found swimming around.

2018-06-13
Saw some fry swimming vertically. Immediately removed the female Betta from the spawning tank. As usual, the male Betta busy collecting and moving the fry back to the bubble nest.



2018-06-14
Saw most of the fry started to swim freely. Again, immediately removed the male Betta to prevent similar incident in BSL20180506 to occur again. We don't want to take our chances and decided not to use leaving-father-with-fry breeding method.

2018-07-12
When group of fishes grouped together and lay at the bottom, this was an abnormal behaviour that we have observed in our female sorority tank last time which wipe out all the fishes in the tank. Immediately, we did a 90% water changes and see the conditions have improved. After the water changes, the fishes have started to swimming freely in the tank. We're still not exactly sure what was the root cause.


2018-07-13
For the last weeks, we noticed a few fishes have died and some fishes grouped together and lay at the bottom of the tank and some were resting at the plant. Based on the past experience, we suspected there must be an outbreak some how but not sure the root cause. We immediately removed all the fishes to a temporary bowl with Methylene Blue medication to remove fungus or parasite; or ammonia or nitrite poisoning. Note that we did a 90% water change yesterday but the condition was improving for a while and reverted back to old symptoms.


2018-07-17
We still monitoring the fishes in the small jar but there have been no causalities. Daily water changes is a must.

2018-08-10
Certain fry have noticeable silver colouring on their body. Growth have been quite slow and we have quite a few causalities due to careless water changes. Good news was this spawn was not on medication anymore.

2018-08-18
Moved the spawn to a bigger tank together with spawn from BSL201806024.

Retrospection
1/ Daily water changes is important for the fry growth and prevent any infections.