Showing posts with label career. Show all posts
Showing posts with label career. Show all posts

This Week I Learned 2019 - Week 06

Last week post or you can going through some earlier stuff.

Happy new year again or rather, happy Chinese New Year. The weather was blazing hot compare to all the previous year even though there is no fire haze from our neighbouring country.

What else I've learned this week not within this post? Going through the sixth week of ornamental fish culture on fish breeding techniques such as selective breeding and biotechnology. Since this is a short lecture notes, I've decided to continue with week 7 study notes which discuss on seed production on factors affecting larvae rearing and feeding (species and water medium). The review paper of this week is the masculinization of the ornamental Siamese fighting fish with oral hormonal administration. SMS::ClickSend is the Perl module of the week to be reviewed.

Is Nokia 6303c still available these days? The most memorable and funny post I've read so far this year. I'm not sure under what context the poster needs to use a durable normal dump phone, but moving from Nokia 6303c, Nokia 216, Nokia 150, and lastly CAT B30 His perseverance is commendable and definitely should be the coolest post (not coolest use) of Perl usage writeup. I miss the old monochrome dumb or feature phone which is durable, have long lasting battery, and purposeful usages (call, text, and defend). Does affordable dumb phones still exists (as in 2019) these days? Yes, there are quite a lot and the one that caught my attention are from Alcaltel model 10.54, 20.08, 20.51, 10.50. Why dump phone still have a market these days? Four words. Africa and senior citizen.


What are the differences among the subroutines in Carp module? Carp is a Perl module that provides alternative subtitutions to to `warn` and `die` in Perl? The screenshot below summarizes it the best. If you want the similar backtrace feature but don't or can't change your Perl code, there is always a Carp::Always module that will patch the `warn` and `die` subroutine.

What does a long time developer want? "Build more long lasting artifacts." How? Contribute more to FOSS then, is as simple as that.

Is Makefile redundant? In some context, yes. Because if you've a shell available, any shell scripts should be sufficient enough to emulate a Makefile as shown below.
    set -e

    case "$1" in
            docker-compose up -d

            docker-compose rm -vsf
            docker-compose down -v --remove-orphans
            docker-compose build
            docker-compose up -d
            echo "unknown verb: $1"

Write and publish a book in ten minutes per day? (via HN) Is this doable? Yes, you can just sit there and stare at it for ten minutes. However, the ten minutes is just the appetizer, to get your started. Maybe you can be in the zone or maybe not but you did something, even through you're just sitting there. The thing is you must do it every day, and every day it get easier. Remember the Jogging Baboon?

However, your brain still works on the task subconsciously even after the time frame. If you're not writing a book, what else can you do in ten minutes per day then? Doubt so as you brain still process the task the whole day even after the timed duration. Hence, the ten minutes is just to bootstrap the task and you've spend a few hours later doing it subconsciously.

There is another important lesson here. When to stop. If you don't have any juice left, stop. Or if you doing very well like in the zone, stop so you can look forward to continue tomorrow.

What else can you do during the ten minutes duration? There are plenty of things such as writing a dairy journals (via Lobsters), pick up any new habits, 5BX exercise plan, core wars kata.

This Week I Learned 2019 - Week 05

Last week post or something else instead.

What else I've learned this week not within this post? Going through the fifth week of ornamental fish culture on fish breeding specifically in live bearer; eggs scatterer and eggs depositor; bubble­‐nest builder and mouth‐brooder. The review paper of this week is the study of effects of photoperiod on reproduction of Siamese fighting fish, Betta splendensThe week was concluded with a Perl module review of API::Google.

How do you pick the best traits to breed Betta sp? If you watch the video below, typically it will take a few generations (if you're lucky) to obtain the good traits to develop a good line. How long? Roughly 4 generations which is around 2 to three years, provided that these broodstock reach maturity around 6 months and you've a quality traits to choose from.

Which show has the best NBA commentary? The Jump, the weekday daily discussion and debate show in ESPN on NBA. Compare to other NBA commentary shows, Rachel Nichols did a wonderful job setting the pace and keep the discussion going on. Commentary was always to the point and the viewer can always learn something new from the guests. Tracy McGrady and Jackie MacMullan combo was great with healthy debate.

How to improve your Bash-fu? Do everything in pure Bash. The main issue with shell script or terminal is we have too many choices and too many legacy baggages. Does having a software monoculture solve the issue with decision fatigue? Yeah, in some ways. I've been using Zsh for a while and there are some quirks that need some times to adapt to.

How to be successful? (via HN) Always debatable and subjective as certain things can be measurable (financially) or not (relationship). Perhaps when you have enough and be content, "moderation in all things." Or being healthy in term of physically and mentally. Maybe you can do what ever you want to do? Why not just read the opposite, advices from people who are not successful instead? When comes to advices, be careful of the survival bias. Maybe there is no such thing as success, a donkey is successful as a donkey.

Maybe reading through what people say before they die? (via HN) will let us reevaluate our definition of success. Nevertheless, this quote caught my attention when come to your own career. However, if you still love what you're doing after so many years, effectiveness is just the side effect.
"You don't want to be in a career where people who have been doing it for two years can be as effective as people who have been doing it for twenty—your rate of learning should always be high."

This Week I Learned 2018 - Week 46

Last week post or something else from the past instead.

What I say to people who are looking for a job? (via HN) Is not about job hunting but a good step-by-step guide on identifying on what you want to do with your life or career instead. The advice is useful to evaluate the reality of what you think you love to do and actually doing it for a long period of time. Very much suitable for fresh graduates who don't know what they want to do with their life. For example, most young people with some programming knowledge dream to be a game developer but once they start building their first game, the initial passion will die down and most will quit after a while. Maybe they don't have the lack of right exposure, support, and environment. Nevertheless, passion, interest, and enthusiasm varies from person to person.

Meanwhile, if you had two months off between jobs what would you be doing? Do nothing but eat, sleep, shit, and repeat (just to unwinding) or travel (not the usual tourist type trip but maybe solo trip). Or go through your long postponed someday list and finally pick something up and pursuit it. Perhaps, "work" as usual but at home doing your thing as usual.

What is like to survive a month without computer? (via HN) He is not the first who tried this before, someone else did it for two months, and another one, a year without Internet. We're left wonder what it's like without any exposure to any electronic devices these days. Can we survive a day without our mobile phone? Doubt so for most people these days. Can you imagine the anxiety of not having your phone next to you? It used to be a norm last time. At the end of the digital sabbath, the author felt that it's not that special or spiritual as he hoped. He did, however, recommend that instead of two months, try digital detox or going analogue for two weeks.

Similarly, Vipassana retreat is harder and requires more mental power but maybe too extreme for most people. Another approach, Mauna, the practicing observing the silence is worth trying as well. For us mere mortal, start small. Away from any digital devices or Internet during the weekend. Off everything after 6pm during the weekday. Start from there, slowly but surely.

I've been investigating digital detox for quite some time and implement some of these strategies with moderate success and failure. Still, more adjustments needed as we're trying different approaches.

Is "not doing anything at all is the most productive thing you can do"? Boredom may be good for your creativity. As they said, "an idle mind is the devil's workshop". If you're stuck with a problem do something else not relevant and does not engage your brain. You subconscious mind will do all the works. I was wondering what if we dont do nothing and just stay in a very quiet place, where you have nothing else to do except engaging and confront your own thoughts, will you go crazy? Yes, in 45 minutes, in the world quietest place.

Do you know how Red Hat was initially funded? 8 credit cards with a debt of 50k. Crazy as it sounds but it seemed this was quite common practices for business that can't get proper loans. The sales of Red Hat to IBM did pinque some interests on its founders and humble beginning (via HN). While I believe they should have use apt as the package manager instead of reinventing another subpar package manager, rpm. They have proven themselves to be the most successful companies or poster boy of FOSS world.

How do you keep track of the articles you want to read? Instead of overwhelmed yourself with pending reading list, the best approach is just "now or never". Why put off when you can do it today? If any articles are important enough or worth your attention, read it now. If you have more then 10-plus tabs opened, then you're setting yourself up for information overload. Often, we save too many articles but never get the chance to read it. Most of these articles are mildly interesting and should be put it someday anyway.

Is there anything else like Memepool? Yes, we have Useful Interweb, "which brings only the best links every day".

What is the worse code base you've seen so far? Oracle Database 12.2. The insight shared by an ex-employee did shed some lights on maintaining extremely large legacy software project, in this case, a database management system. While this mess can traced back to overseas Indian team but US team should shares the blame as well. However, it was mess to start with in the first place. And, as usual, there is always a xkcd comic to describe such insane scenario.

This Week I Learned 2018 - Week 44

Last week post or something else from the past.


What is GNU Kind Communication Guidelines? (via HN) The first comment (shown below) caught my attention of effective communication. However, there are always exceptions.
This is excellent; using love and persuasion to help someone improve is so much better than by force, compulsion, and fear. How many children rebel against restrictive and domineering parents? but a child who is loved and taught, but allowed to make choices and pursue independence usually ends up much healthier and happier.
Why digital detox is still more than essential these days in digital era? Repeated interruption leads to lost concentrationDiscussions at HN thread proposed several ways but is there a way to reduce this impact? Yes, but without discipline and life style changes as we're too digitally connected. For a start, take life slowly and be more patience. For example, reading a dead tree book is harder these days we have alternative and faster way to do so. But, isn't it nice to just slow and enjoy the smell and texture of the book while doing so?

When does education stop? (via HN) An essay of justification for studying liberal arts against the practical Science, Technology, Engineering and Mathematics (STEM). Regardless the choice you made in your life or career path, love what you do, and do what you love, provided you don't starve yourself and your family to death. Note the article is hosted in David Bull's site, a very dedicate gaijin woodblock printmaker on preserving and populating Japanese woodblock printmaking.

How to write a technical paper (pdf)? (via HN) The advice on writing good abstract was the best I've read so far. Easy, step-by-step, and straight to the point. Not to mention several other ways such as rules, formula, or algorithm as recommended for further reading.

What do you do in your 1-on-1s with your direct reports? Build trust.

How to check the React version of the app using it? There are many ways (depends on the ReactJs library was minified or not). The simplest way so far (may not work for all) is as follow. Is Facebook is using the latest greatest version? Seemed so.

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

This Week I Learned 2018 - Week 17

Last week post or something from the past instead.

Humour aside, I've known two persons (a tech guy and a lecturer) who don't even have a mobile phone, let alone social media accounts. Yes, they are on the rather extreme cases but that was due to their own personal stands and life philosophy. While there have been quite a lot of minimalist life style movement these days but little emphasis on digital world. As usual, moderation is the key here. Too much of everything will cause unwanted disturbance and distraction to your personal and working life.

The Playoff Rondo is part stats and part myth although the stats don't tell the full story. But it's quite entertaining to watch him play, especially the playoff and with big centers.

Plan B before you turn 40. (via HN) Relevantly, experiences on those over 50 who have been laid-off from the tech-force seemed quite positive, life still goes on although on different path. Well there are differences different between Western and Asia countries, this is just part of your work life, especially for those working in tech. Practice minimalist life style, live below your means, exercise and keep healthy, and do what you love. You have to agree with, web development is so accessible these days. Anyone good basic knowledge of English and keen persistence, they can build up the system fairly quite fast. Furthermore, as you aged, priority in life changed as well as your health. Moreover, older tech guy tends to question more and call out BS.

Where SCRUM is not the right choice. (via Reddit) The discussion in the Reddit tells a lot of the horror or abuse stories where SCRUM was implemented literally. It does not work for software team with different project and don't share the SAME backlog. If you have different products, you can't implement SCRUM within the same backlog! Period.

Friendship’s Dark Side: ‘We Need a Common Enemy’. It's a common knowledge but right now it have been proven that "Xenophobia and in-group bias go hand-in-hand". Average fall-outs withing the social group is around 7-plus months. Interesting read.

One item checked off the bucket list. More items to go.
$ cpanm Webservice::Swapi
--> Working on Webservice::Swapi
Fetching ... OK
Configuring Webservice-Swapi-0.1.1 ... OK
Building and testing Webservice-Swapi-0.1.1 ... OK
Successfully installed Webservice-Swapi-0.1.1 (upgraded from 0.1.0)
1 distribution installed

Select all parent and child records. This is when having a Venn diagram really help in visualizing the details.
FROM comments AS parent
LEFT JOIN comments AS child 
ON child.parent_id =
WHERE parent.parent_id IS NULL

This Week I Learned 2018 - Week 16

Last week post or something from the archive.


Another week of learning new English vocabulary. One issue with making sentences using these words was that the sentences was either too forceful or too literally (直译的) translated.
Sandy alleviates (缓解) the excruciating pain on her lower body part by elevating both legs into a bucket with warm water. By doing so, they hope it can obliterate (忘却) the pain she was going through. Both legs were swelling due to her falling into liquescent (易液化的) soil and stabbed by tree trunk while trekking in the wood. The swelling have worsen and everyone worry that the muscle may liquefy (使液化) from within. 

Stuck with an interesting MySQL problem, which was quite easy but I can't seem to get it right after several tries. Basically we want to update certain column in t1 to the maximum value from a group of similar records. The SQL query was quite straightforward, just join with the second table, t2 with maximum record with the first table, t1.
UPDATE t_transaction tu
    SELECT code, MAX(flag) AS flag
    FROM t_transaction
    GROUP BY code
) t
ON tu.code = t.code
SET tu.flag = t.flag

Modern backend developer in 2018? (via HN) A checklist and decision making tree are always a good choice to make good decision making when picking up new technology stack.

Perl constant array. Sometimes the simplest and easiest way is the only way instead of going through and abusing quirky Perl syntax.
use constant FRUITS => ['apple', 'orange', 'banana'];

my $fruit = 'apple';
if (!grep $fruit eq $_, @{+FRUITS}) {
    print "Is not a fruit";
} else {
    print "Is a fruit";

use constant FRUITS => qw(apple orange banana); 
use constant FRUITS => (apple orange banana);  
my $fruit = 'apple';
if (!grep $fruit eq $_, FRUITS) {
    print "Is not a fruit";
} else {
    print "Is a fruit";

Modern PHP without a framework. (via HN) Nah, still hate it after all these years. Maybe I'm just prefer a more prettier programming language.

所以,你得先釐清有哪些條件是你重視的,像薪水、公司品牌、職位、工作內容等,一一把它寫出來。列出條件後,再排定先後順序,之後,和你手邊的 offer(拿到手的工作)比較,做成表格。縱軸是你重視的條件,並依照先後順序,由上而下排列;橫軸則是你拿到的 offer。當你完成表格後,該選擇的工作就會自動「跳出來」。
工作上要留下那个”人才“? 当然是人品态度优先,能力可以慢慢去培养。

What are some tech companies that do not use open floor plan? Interesting question for those who are looking to justify cubicles. The office at Fog Creek was in between, open space for collaboration and private office for working.

Data class in Python 3.7. (via HN) What took them so long? Syntactic sugar or not, this should have been in any fundamental data type for any programming that supports OOP.

Vipassana for Hackers. (via HN) A book on how a tech guy perceived and practiced Vipassana meditation without involving religion, just the practice. Contrary to typical meditation book, lots of pictures explaining the core concepts.

Moving for good. (via HN) Good write-up when you're moving to a new place. Key quote here (emphasis added),
Ask lots of questions. Ask them to explain things, and show you how it’s done. When they state a fact, ask how they know. When they state an opinion, ask for examples.
How to be a systems thinker. (via HN) I still can't get my head to understand this and the list of reading materials is quite long. Worth spend time on this? We shall see then.

This Week I Learned 2018 - Week 14

Something from the archive or last week post.

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

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

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

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

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

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

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

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

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

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

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

This Week I Learned 2018 - Week 13

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

The Nightmare Letter: A Subject Access Request under GDPR (via HN). GDPR (General Data Protection Regulation), the new data protection law coming into force on 25th May, 2018. Ironically, an article posted in a site that making profit from our shared data. There always this saying I read online many moons ago regarding privacy, "If you have done nothing wrong, then why you need to worry about people tracking your Internet usage?". And the counter argument to this question is "Everyone knows what we did in the toilet, then why we still need to close our door?". Corporations have long monitored and tracked our daily movements and behaviours and people needs to be educated and aware of such activities and their right to erasure, also known as "the right to be forgotten".

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

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

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

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

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

This Week I Learned 2018 - Week 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 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 04

Last week post or the archived stuff.

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

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


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

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

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

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

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

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

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

This Week I Learned 2018 - Week 02

Last week post or something recent from the past.

农历新年即将来临,在寻找适当的春联Antithetical couplet)时,偶然读到古代的「烟锁池塘柳」这上联,自古以来,难有适当的下联。但花燃山色用程序来寻找最佳的下联即搞笑又聪明。佩服!佩服!话说回来,历代比较好的对句如下:

  • 烟锁池塘柳,灯镶酒坊楼。
  • 烟锁池塘柳,炮镇海城楼。
  • 烟锁池塘柳,桃燃锦江堤。

After watching the demo on how to build your Javascript project using Webpack and Gulp. I'm seriously wonder what the eff have happened to the web development, especially the front end? While I'm for using latest development tools if possible, but the complexity of building and bundle the JavaScript rubs me the wrong way. Yes I know, once you get used to it and embrace it somehow. Where was the simple way of building web application?

When you're getting a new fish or plant to your tank, you will need to quarantine both. The issue with introducing new fishes or plants is that they may carry disease, fungus, and bacteria. Having a proper quarantine procedures also prevent potential pests (e.g. snails, insects, or worms) from being introduced to your tank. How we going to do that then? A teaspoon of aquarium salt and Methylene blue (a drop per gallon, depends). Vinita Phord have written a good introductory guide on the whole process. Adapt and adjust on your own.

Interesting talk given by a fellow data scientist who was originally a developer. Wish more young fresh graduates could join the talk. On the career side, the presenter gave tips on how to get yourself ready in data science. Three things: build enough competency, have confidence, and know enough to get it through. Always hire for the right reason, not just mere head counts. For young people, the most important criteria for selecting a job is the role is supportive to your career growth. Not just the salary, when you're fresh, pick the right environment to learn and contribute. Unfortunately, the talk was diverted into another old unresolved discussion or dispute of why we don't have enough lady in tech?

Fishackathon. Just realized this week that such even exists. The monitoring device in the 2016 winner team piqued my interest. Does a similar devices on a smaller scale exists in the market for hobbyist? Yes, there is Open Aquarium (based on Arduino) which is, unfortunately, costly and bulky.

Surprised to found that famous illustrator or comic artist, Chen Uen have passed away last year. Parka Blog have a review of his works. While I'm not a fan of his works, I firmly believe that Wuxia comics should definitely drawn in traditional Chinese painting style rather than the typical manga style.

This Week I Learned - 2017 Week 43

Last week post or the usual archive.

Lots of things I've learned and shared during the week. I sincerely hope the young lady who is starting a new chapter in her life is going to learn to invest her money wisely.

Seven years ago, there was one technical question that still lingered on. Due to some unexpected coincidence, I managed to revisit and solve it. The lesson learned here is given any web application performance problem,  if the bottleneck issue cannot be optimized further and the programming language lack of or stable support for asynchronous model, just delegate it to a message queue system.

Do you have the Learners Syndrome? Yes I do.

Where Do Old Programmers Go? The best, funniest, and sad answer is "They don't Go anywhere, instead they Rust?". But one question still remains, as Slashdot reader puts it (emphasis added by me). In the end of the day, is between money and legacy.
"Another who used to be self-employed coding for people on a consulting basis told me he got into woodworking, eventually. His reasoning? As you get older, you start asking yourself questions like, "What have I created that will be used and enjoyed by others even after I'm gone?" It's easy to sink years of your life into a software application, only to find that in a decade or two, nobody is using it anymore. It's become "old and obsolete". If you build good quality, hand-crafted furniture pieces? They're quite likely to be used for 100 years or more. Build a dresser for one of your kids and they may even be handing it down to THEIR kids."
How to write efficiently. Keep it short and simple.

Scott And Scurvy. Really long but worth going through the whole essay or you like the YouTube version of it. So much wasted efforts on focusing on the wrong stuff than we should just focus more on the medical and scientific research. Scurvy is a curable disease due to lacking of Vitamin C.

This Week I Learned - 2017 Week 34

Last week post or the old archive stuff.

Having a working and non-disrupting battle station have finally let me able to concentrate on my personal stuff. There are a lot of things to clean up and de-clutter but one thing at a time. At least I can sync up the productivity at both work and home.

Lots of re-learning of ConTeXt, after so many years away from it. The number one rule in using ConTeXt, you must append a comma (,) in a list of items. Not sure why, but I was burned several times where the intended results were not obtained regardless numerous times of trials and errors.

This will not work.

This will work.

Undo certain Git commit. Two steps involved. First is to reset or remove the particular commit and push the changes to remote origin. Second, pull from the remote origin and reset the index.
$ git reset 7f6d03 --hard
$ git push origin -f

$ git fetch origin
$ git reset 7f6d03 --hard

Finally, found the effective way of managing your dotfiles and the full write-up describes the details on how to set it up, either new or existing Git repository. Good example where the lack of understanding of Git undermines the effective usage of managing your dotfiles. There is no need for external programs to manage your symlink and updates. Just plain old Git. The hassle and complexity of managing your development environment setups (I've tried a few ways) is not worth the time and efforts.

People, this is how you design a login or registration form.

Installed, uninstalled, and reinstalled the Vim package. Somehow the path to Vim binary have been messed up. However, update the Bash's hash table of full path names of executable files seems to solve it.
$ vim
-bash: /usr/local/bin/vim: No such file or directory

$ which -a vim

$ hash -r

Somehow my Vim installation does not support Python plugins. Some googling here and there revealed that I have multiple implementation of Vim installed in the system. The default selected Vim binary does not support Python plugins. The only way is to update the alternative.
$ sudo update-alternatives --config vi
There are 3 choices for the alternative vi (providing /usr/bin/vi).

  Selection    Path               Priority   Status
* 0            /usr/bin/vim.gtk3   50        auto mode
  1            /usr/bin/nvi        20        manual mode
  2            /usr/bin/vim.gtk3   50        manual mode
  3            /usr/bin/vim.nox    40        manual mode

Press  to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/vi (vi) in manual mode

$ sudo update-alternatives --config vim
There are 2 choices for the alternative vim (providing /usr/bin/vim).

  Selection    Path               Priority   Status
  0            /usr/bin/vim.gtk3   50        auto mode
  1            /usr/bin/vim.gtk3   50        manual mode
* 2            /usr/bin/vim.nox    40        manual mode

Press  to keep the current choice[*], or type selection number: 2

People start hating their jobs at age 35? (via HN) The best possible reason is that they become very aware of mortality and realize time move at a relatively faster pace.

How the RPi::WiringPi distribution is tested. You have to be amazed by the effort the author is putting in ensuring the quality of the libraries. Probably one the most meticulous developer I've seen online. The hardware setup is shown in the screenshot.

Don't like any ready-build electronic prototyping platforms? You can try Shrimp parts kits. I love the minimalist approach of gathering different electronic components and build something up. Good alternative to Arduino. The step-by-step guidance, for example, to blink an LED, is a good introduction for any beginner (yours truly) who want to pick up some electronic.