This Week I Learned 2018 - Week 43

Last week post or something else from the archive instead.

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

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

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

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

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

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

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

                Contrib packages installed on x230

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

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



This Week I Learned 2018 - Week 42

Last week post or some random stuff from the past.

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

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

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

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

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

This Week I Learned 2018 - Week 41

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

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

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

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

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

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

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

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


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

This Week I Learned 2018 - Week 40

Last week post or something from the past.

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

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

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

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

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

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.

2018-10-13 (2nd week)
The fry were growing at expected rate and it's quite a big spawn, roughly estimated around 100-plus.


2018-10-20 (3rd week)
Few survived the outbreak (we're not sure the actual reason) but suspected that we may overfeed, forgot the feed it, or spooked the male Betta causing it to eat all the fry. Nevertheless, we took out the male Betta into its container and try to salvage the remaining fry, which was roughly around 10. We fear that the whole spawn will be wipe out, just like previous failed spawn.

2018-10-20 (4th week)
The remaining ten did not survive except just one fry, the alpha or largest among the group. We cleaned up the whole breeding tank and extracted the one and only fry to its own container. We now have a unique situation, first in our case where we have a spawn of one of all our breeding project.



2018-10-27 (5th week)
The one and only fry was doing well but growth was quite slow and limiting.

2018-11-03 (6th week)
Still surviving but the growth rate was not improving. We fed more BBS and the fry seemed to have taken it but still, growth was slow. Contrary to what we read, isn't a fry with plenty of spaces without any competition should grow quite fast and well?

2018-11-10 (7th week)
Maybe we're not changing the water frequently enough which leads to slow growth?

2018-11-10 (8th week)
The last surviving fry did not make it. Thus the conclusion of this spawn.

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

2/ To be safe, do not keep the Betta male withing the spawn, especially for those hard to find pair. Remember to remove the Betta male as soon as the fry start to swim freely.

3/ If you still want to try the father-with-fry method, do it only for non-virgin female Betta. Best not to waste the eggs.