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 with breeding two Black Dragon, 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 Betta were purchased from the same breeder and 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.

This Week I Learned 2018 - Week 23

Last week stuff or something from the archive.

We're half way through the year of 2018. Some new adjustment to my weekly blogging. Starting from this week, more question and answer style of writing.

Old school or just plain hipster? It seemed that the newly appointed important person does not or will not use a mobile phone. Interesting indeed.

What happened when the town beats the land in a sweep? It will get boring and expected, the usual classic rags to riches story line. We need more competition, super teams, and nemesis within the NBA league for the next coming seasons.

What happened when your stakeholders want to start a project that requires "seven red lines" ? Brutally honest or diplomatically tactful?

Does open office have a big impact towards deep work? And does it matters? The discussion in HN yields a few interesting points but the main question remains, why organization still insists on open office and expects deep work?

Is QBASIC a good beginner programming language? The sentiments in the HN members believed so, so do I. Simple (yes, even simpler than Python) and easy to get it up with a good TUI. For a modern equivalent, load81 is probably the closest thing.

Should you use your ISP's DNS server? Hell no. Switch to either Cloudflare's 1.1.1.1 or Google's 8.8.8.8. Not only you gain faster domain resolving speed, you also have privacy (debatable). When comes to implementing privacy in DNS, it seemed we have three protocols of DNSCrypt, DNS over TLS, and DNS over HTTPS.

Should you learn multiple programming languages or master one? Depends. Different people have different motivation, learning strategies, and priorities in life. Either one should works. Do what you love and love what you do.

How do you improve your writing skills? Measurement and volume. First, "you improve what you measure", a very metric-driven way of doing it. However, this may backfired as according to Goodhart's law, "When a measure becomes a target, it ceases to be a good measure.". Second, just write, deliberately, in fixed amounts of words. How? First, don't judge your works, forget grammar and spelling, just churn out words. The Emacs's typewriter mode is a good strategy.

When come to superheroes, how do you justify the existence a character without any special super powers? They have better soft skills and less ego than more powerful super heroes. Watch A critical component for a better visual answer. I almost chocked myself laughing non-stop while watching this, repeatedly.

How do we implement operator overloading in Perl? Use `overload` package. Example of good implementation is the `Data::Money` package.

Betta Spawn Log : BSL201806008 : Giant Armageddon (M) x Giant Galaxy (S)

An ad-hoc breeding project since we obtained another Giant Betta and quite a few female Giant Bettas were in fertile with eggs. Hence, we decided to proceed with this breeding project.

Male: Giant Armageddon
Age: 7+ months
Temperaments: Active.
Size: Medium (4.0cm body only)
Grade: B

We bought this at the local fish shop near Jalan Pasar as we never have a Betta Armageddon before, moreover it's a giant Betta. This male was quite active and started to make bubble nest every time a female Betta was near its proximity. Since SO like this Betta, we have setup a special tank and minor aquascaping to keep the fish entertained. We suspected that this Giant Betta was quite old due to its humpback.




Female: Giant Galaxy
Age: 8+ months
Temperaments: Fast.
Size: Medium (3.0cm body only)
Grade: B+

Since the last Giant breeding project, BSL20180315, with this female Betta, the fish have been kept separated for any breeding project. We did once try to match this female Betta with a Betta Koi. However, this female Giant was so aggressive to the male Betta and the breeding project was not successful.


Log Notes
2018-06-08
Eggs were seen in the bubble nest.

2018-06-11
Fry were seen swimming vertically. The female Betta was removed immediately to prevent it from eating the eggs.

2018-06-14
The male Betta was extracted and moved back to its own tank. The male seemed to have sudden shock and was seen holding upwards position for a while.

This Week I Learned 2018 - Week 22

Last week post or something else instead.

为什么同级相斥,异级相吸呢?这不是指磁铁的原理,而是可以用来形容两个同样作风的领袖都会同样排斥。客观的见解来看待各国领袖的作风。

It actually dawned to me that `eval` is quite similar to try-catch block. If your language did not have the support of try-catch exception handling, `eval` (yes it's evil) is your friend. Even Try::Tiny have its own issues. Perl is really a f-up programming language.

VS Code can do that? (via HN) I still haven't have time to install VS Code in my lappy and set up all the necessary configuration and settings.

What's the point of Perl's map? To transform list without using for (each) loop. Is as simple as that and yet we still having hard time understand that? Another good discussion on different between `map` and `grep`, the former is to process a list, the later is to filtering a list.

Containers according to xkcd. Sometimes the simplest solution is the best solution.

30 is too old for tech job in China. (via HN)

REST API tutorial. Yes, I've done a few wrapper for third parties API and two common issues are not up-to-date documentation and inconsistency, especially when handling different HTTP responses.

Block EU users from accessing your site due to complication of implementing GDPR. Brilliant or just simply crazy. And then you have the GDPR compliance checklist or search through the whole GDPR legislation document instead from the original source or community curated info. GDPR is probably the best things that happened to protect user privacy and reduce the abuse of any organizations on handling our personal data.

"Just write. You'll find your own voice". Probably the best common advice given to anyone who wish to become better at writing. For something related to writing, Janki Method, an approach to learning. When you learn something new, write it down but in an approach of question and answer. Maybe you can use a flash card or something.

Stack Overflow for Team. Interesting, very interesting indeed. I chuckled when I saw this feature was released. Wonder how it likes to re-implemented someone else features. Yeah, we should see things from both ends. DRY can be violated if necessary, only if necessary.

Yeah, making money is nothing but how much you care about making money (emphasis added).
Caring a lot about specifically making money is, in my opinion, absolutely key to making money, because otherwise you just end up focusing on other things (family, pleasures, ideals, etc.). If I wanted to make money, I'd design a very different thing in a very different way compared to if I wanted to make something me and my circle of friends would find useful. These things are practically disjoint.