Showing posts with label aquarium. Show all posts
Showing posts with label aquarium. Show all posts

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.

This Week I Learned 2018 - Week 19

Last week post or something else instead.

Surprised and shocked. The only two words I can think off to describe my feeling for the past week. First, surprised because this one particular item on my bucket list which I guestimate will took me next 20-plus years or never to check off have been accomplished this week. Secondly, shocked it came so soon and such a massive shift and the non-stop flair of dramas. The staycation was well-needed as I was still recovering from my injury. Enough said, I've done my part and moved on to next item on my list.

Infestation of the Blue Green Algae (BGA) is getting worse and we have to do almost daily water changes on certain aquarium tanks. Prevention method is quite straightforward, use blackout method. First, 30% to 50% water changes, add air stone, cover tank for 3 to 4 days, and did another 30% to 50% water changes again.

Some MySQL stuff I've encountered recently.

When creating a MySQL stored function, do remember if the function does not modify data, you will need to set extra explicit options for binary logging.
ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL,
or READS SQL DATA in its declaration and binary logging is enabled
(you *might* want to use the less safe log_bin_trust_function_creators

The sample SQL statement as follows.

The limitation or restriction of subquery in MySQL. It doesn't supports `LIMIT` in subquery yet? Encountered this error message. To work around, you've to rewrite you SQL query using `JOIN` instead.
SQL Error (1235): This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'

Can't delete using subquery? Wrap your subquery in additional subquery.
FROM tableE e
        FROM tableE
        WHERE arg = 1 AND foo = 'bar'
    ) x

This Week I Learned 2018 - Week 11

Last week post or something from the past.

Another week, another compilation of vocabulary list. The list of words were a bit tricky to cohere (一致,连贯) together into a convincing paragraph. Just let your imagination go wild then!
The island have been inhabited (居住在) by the isolated indigenous (土著) peoples since long before it was discovered by foreign outsider. Strangely enough, the tribe was hospitable (好客的) and willing to embrace outsider even though there was some resistant initially. People in the island are not herbivore (草食动物) due to the climate and available food source. Within the cold climate with little greens available, tuna fish is their daily source of protein. Tuna fish, due to its distinct smelly fishy odor inhere (存在) can lead to to halitosis (口臭), which can be quite put off to outsider. The people in the island adhere (持有信仰) to a strange religious ritual where they don't inhume (埋葬) the death but instead leave it open in the wild wrapped in Tuna fish skin in a helical (螺旋) way. Everyone was inhibited (抑制) from getting near to the burial ground forever as it will bring bad luck for those who ignore the rule.
Ask HN: Were we more productive 10, 15, or 20 years ago? The question raised was related to development works itself. Were we? When comes to web development, not really, more marketing hype and too many choices available. Furthermore, too many tools, and too many abstractions. In other words, paralysis by analysis or decision fatigue, which made us ends up doing nothing.  What worse, we were bombarded by so-called news these days which read like tabloid instead. Technology made things done faster but at a price, we're more disconnected and distracted. Or maybe we (those reaching middle age) are more grumpier.

The Pilot System rule. The first system will always developed incorrectly somehow due to lacking of understanding and edge cases. Focus on the programmer productivity instead of focusing on optimizing the system itself.

Lesson learned when breeding Betta fish. We've made a few mistakes by our self and pretty much can relate to the breeder himself.

While we're talking about fish, the best video so far on using salt in your aquarium or towards your fish. We must be using salt wrongly, no salts are created equally, even chemical components are different!

This Week I Learned 2018 - Week 10

Last week post or something from the past.

More movement this week. Daily walking steps have increased from normal average. Most likely due to some extra house cleaning here and there.

Something new this week. I've learning two words on almost daily basis for the past few months. To further reinforce my understanding, I will start writing a small paragraph using all these words. It may sounds forceful but it's quite fun as it will test your creativity and understanding. Yes, the writing and word choice can definitely be improved.
Unusually fat, tall but handsome, nobody will suspect Dr. Lee was a habitant (居住者) of a athletes' village that produces world class gymnast. As the only doctor who specialized in gynecology (妇科) and obstetrics (产科) in that area, his clinic is thriving (兴旺) with patients and business is good. While Dr. Lee still remain unmarried, he is currently cohabit (同居) with his girlfriend, May, for last five years. When they first met, Dr. Lee was muscular, charismatic, exciting, and fun at first. But things have changed all these years. He was grandiose (浮夸的), self-centered, and controlling. Little she was aware or choose to ignore that her future Mr.Right is actually a misogynist (厌恶女人的人). Worse, her future husband does not believe in monogyny (一夫一妻制) but rather polygyny (一夫多妻制). A little birdie have told May that Dr. Lee have already married and have a few kids at his hometown. Yet, she choose to ignore it and treat it as rumour due to jealously.

New T5 LED light installation leads to outbreaks of aquarium algae in a few aquarium tanks. To rectify, the usual water changes, siphon, scrubbing, and turning off the light did help a bit. Our observation and suspicion leads us to believe that it may be caused by infected aquarium plants or fishes (not enough time for quarantine) and non-stop exposure to light.

Meanwhile, I've created and started a Betta fish spawn logs page. It's pointless where your notes were scattered all over the places and it's best to just consolidate all the information into one page.

Over-justification effect. That is what happens when your hobbies or passions become your work. Nothing but discipline to proceed ahead or just to move on to something else.

Best project management practice in 2018?. The discussion on Scrum itself is honestly so true that many organizations are just practicing cargo-cult agile. Also it also depends on the type of project, there are certain systems (health, military, and etc) that cannot be developed in an Agile way. Maybe the WhatsApp approach in the right way as shared by its Engineer? Reading through the The Mythical Man-Month these days again felt like reading a satire.

This Week I Learned 2018 - Week 09

Last week post of something from the past.


Google Chrome's Lighthouse. Yes, definitely a good tool. Now you don't need an external consultant to advise you on how to fully optimize your website or web application. Definitely important if you want to implement RPRL pattern in your Progressive Web Apps (PWAs). Web development is getting more complex due to increasing popularity of mobile web.

If you're doing any forms of technical support, documentation is a slow but good return of investment. But yet, so many organization and developers does not enforce or encourage such practice due to myriad of silly and selfish reasons.

Signal foundation (via HN), made possible (50 millions donation) by co-founder of Whatsapp, Brian Acton. Will this work? Sincerely, hope it will works. We definitely needs free and open source privacy technology to enable secure communication.

Comparison between regular glass, crystal glass, and acrylic glass. In the end of the day, availability and price will determine which type of aquarium glass you will buy. If you need a large quantities of aquarium tank, might as well go to DIY route and build it yourself. We've seen quite a few aquarium shop build their own aquarium tanks.

Collecting in the Swamps of Peninsular Malaysia. There are or were a group of local Betta fish breeder as well as fisheries department who specialized in wild Betta that are unique in MY. Unfortunately, local Betta fishes are lackluster compare to the species breed by our neighboring countries.

P1, F0, F1, what are they? Within a year, you can inbreed your Betta fishes until four generations from F0/P1 till F3/P4. Betta fish, either male or female, on average, is mature enough for breeding when they reach 3 months old. For each generation, we pick the best feature we want and breed selectively to create our line. It's a long tedious process and some even took years to get the right features and colour combination. For faster result, we can try outbreeding.

A few more dead fishes reminded me to re-read this article on how to how to ship fish in a box, which tells us a lot about handling water quality parameters (temperature, pH, and oxygen or carbon dioxide level). This information is crucial when you want to extend the longevity of your aquarium fishes. A few key notes from the articles which I've summarized it here:

1/ Wild Betta fish live in warm tropical padi field with the optimum temperatures between 25.5 till 26.5 Celsius. As fish is cold-blooded animal and can't regulate their body temperature, it will follow the temperature of the surrounding water. That is why you will need to acclimate the fish for 15 till 20 minutes before moving it to a new tank. Sudden changes in temperature will stress out the fish and make it susceptible to diseases.

2/ When packaging, use minimum possible water or one-thirds water. Simply because oxygen is hard to dissolve in water and we need as much oxygen as possible.

3/ There is one local breeder which uses sedatives or tranquilizers and he advised us not to mix the packaging water into the aquarium.

4/ So many fish medications do not even list the active ingredient even a Material Safety Data Sheet (MSDS). It makes you wonder long exposure to these chemical liquids will do to us?

5/ Salts (non-treated or coarse/rock salt) is your best friend. Use 2 to 11 grams per liter or 1 tea-spoon per 5 gallons. While some said using salts (aquarium salts is controversial), it does provides multiple benefits. Good example is to disinfect any equipment shared between multiple tanks. We've seen some aquarium shop uses it for their Betta fish and we've personally use it as well. Well, it seems to work for them and us. Furthermore, it also reduces osmoregulatory stress.

6/ Antibiotics? Some aquarium shop use it (yellow powder). Avoid it at any costs as it's harmful to both fishes and human in long term. Bacteria can build resistance over prolong usage.

This Week I Learned 2018 - Week 05

Last week post or something from the archive.

New week and we're embracing the second month of 2018. The summer (for Southern Hemisphere, summer starts from December 1 till February 28 or 29) wind was blowing gently indicating the near of Chinese New Year. 活了大半辈子,原来南半球的季节正好跟北半球相反,真的是受教了!俗语说,“一年之计在于春,一日之计在于晨”, 自己要好好检讨及规划!

Going through my daily steps count, less activity this week due to sickness. Icy cold drinks during midnight and middle-age guy don't was not a good combination. But luckily we have long vacation, good to catch up with my needed rest and recovery. Comparison of total steps walked as illustrated below. (Yes I know the missing legend) Target for next week is to average out the steps till 5000 steps and above.

Dropsy and the whole body is pineconing? Nothing much we can do besides except humanely euthanize the fish. We lost three this week and unexpectedly the Blue Mable is going down also. The typical treatment is daily water changes combines with aquarium salt, Methylene blue, or Malachite green. We're not sure but I suspicious was due to overfeeding which leads to stress and constipation as well as infection.

When visited enough Aquarium shops, you will learn a thing or two. First, antibiotic powder (yellowish colour, suspect the main ingredient is Sodium Nifurstyrenate) usage was quite common especially expensive tropical fish like Discus (not a fan and seriously, a moving water pancake?!). Second, fish sellers in Market Road packed their fishes in plastic bags treated green water (suspect is Malachite green) and unpack it again in plastic square tank for selling each water in plain water. You can achieve profit if you can sustain the longevity of the fishes until they are sold to the customer.

More conversations breeders. It seems that female Bettas are far more expensive than male and fellow breeders don't want to sell their precious female Bettas to retain their quality breed of lines. Only for those who have financial gains from doing this. I wish more breeders should focus partially on the locally Malaysian Bettas. There is one breeder and I wish him all the best. Wild Bettas found locally may not be that colourful but it's good to breed and increase the population.

You know the play was so good that even the opposite bench players applauded it. This reminded me of Kobe Bryant's baseline reverse dunks. Along with Giannis AntetokounmpoBen Simmons is another NBA player to watch out for in the coming few years. Only time will tell.

Too many blockchain wannabe tech startups in Malaysia. Enough said. The never ending of startups chasing the next hype cycle.

How do you unstaged changes in Git? There are cases where merging or rebasing kind of messed up and you're left with a list of modified files.
$ git stash save --keep-index --include-untracked

Meanwhile, you can clean up your local working repository in Git through interactive mode or Git clean interactive.
$ git clean -di

The list reduction functions in List::Util. Some good examples:
$foo = reduce { $a > $b ? $a : $b } 1..10       # max
$foo = reduce { $a gt $b ? $a : $b } 'A'..'Z'   # maxstr
$foo = reduce { $a < $b ? $a : $b } 1..10       # min
$foo = reduce { $a lt $b ? $a : $b } 'aa'..'zz' # minstr
$foo = reduce { $a + $b } 1 .. 10               # sum
$foo = reduce { $a . $b } @bar                  # concat

More effed up stuff in our beloved MySQL. This time, "SQL Error (1451): Cannot delete or update a parent row: a foreign key constraint fails ....". To quote from the documentation (emphasis added),
If ON UPDATE CASCADE or ON UPDATE SET NULL recurses to update the same table it has previously updated during the cascade, it acts like RESTRICT. This means that you cannot use self-referential ON UPDATE CASCADE or ON UPDATE SET NULL operations. This is to prevent infinite loops resulting from cascaded updates. A self-referential ON DELETE SET NULL, on the other hand, is possible, as is a self-referential ON DELETE CASCADE. Cascading operations may not be nested more than 15 levels deep.

In other words, self-referenced foreign key(s) or recursive deletes doesn't work in MySQL (it WORKS in a PROPER database management system like PostgreSQL). You have to create another new table to link the relationship, something like many-to-many data model. If you needs deep nested hierarchy data structure, use Closure Table.

This Week I Learned 2018 - Week 03

Last week stuff and all the archive posts.

大水冲了龙王庙 (一家人不认一家人)。看了几套大陆片,一直听到这句歇後語(英文应该是Idiom吧?)非常适合那些说话不直截了当,话中有话的人。另外还有几句普遍的,例如:
  • 有事鍾無艷,無事夏迎春
  • 豬八戒照鏡子(裏外不是人)
  • 秀才遇到兵(有理說不清)
  • 無事獻殷勤 (非奸即盜)
  • 泥菩薩過江(自身難保)
  • 快刀斬亂麻 (乾淨俐落)

Chinese New Year is around the corner, surprisingly this year, the weather is getting colder and not warmer especially after the Dongzhi festival. Several fishes have died due to infection and we suspected that tank contamination from other fishes without quarantine and cold weather may be the root cause. Water parameters are a dead and life issue for these fishes.

All the Bettas have been quarantines and water changes done on almost daily basis. Some of them are recovering and seems more active. We have change our approach to water changes and sea salt, which are good practices to keep the fishes healthy. Unless necessary, no more chemical like Malachine Green (debatable toxicity issue, it can kill both bacteria or fishes). Methylene Blue or Formaldehyde (aka Formalin) are still safe to use. Even so, each antimicrobials have their own safety issue and met with apprehension issue in the fishing industry, especially aquaculture (fishes breed for eating). Aquarium medication is an interesting area for investigating. Expect more future discussions on this.

Overfed your fishes? Expect bloating and constipation issue to follow suit. Nothing but pea to help them with their digestion. Surprisingly these fishes crave pea. Well, pea should be on their weekly diet then.

cron.weekly is no more. It's not easy to continuously writing up and weekly aggregate posts. Definitely you're going to burn out somehow or another. I've tried different approach and the only possible way is to do it on daily basis, sit down in front of you computer for 15 minutes and write something up. Consistency is the key here, whether you like it or not.

Cal Newport have a good write-up on digital de-cluttering. Find and cultivate high-quality leisure instead of instant gratification low-quality digital distractions (news feeds, social media posts, or videos). A deliberated and strategic pause of using your mobile devices will have quite a significant effect on your daily life. What are your analog activities? These is something I need to reflect upon. For a start, rediscover what you like to do when you're young? Long forgotten hobbies? That's a good start!

Yes, I've installing and setting up my printer and scanner drivers the wrong way (using the official M2070W drivers from Samsung) for so long. There always this conflict between the printer and scanner driver everything I've upgraded my Ubuntu distro. It took me a while, but I was made aware there have been this The Samsung Unified Linux Driver Repository since 2015. Adding a repository, update, and install the necessary drivers and everything works as intended.

Timezone cheatsheet in MySQL. Timezone is always tricky and to do it correctly or explain it persuasively to layman.