Showing posts with label react. Show all posts
Showing posts with label react. Show all posts

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 37

Something from the archive or last week post.

If you want to do a YouTube video on tutorial on photography, how should you do it? So far, nothing can top this video. Well choreographed, interesting topic, and relevant demonstration on applying Morandi (a famous 20th century Italian still life painter) colour style in your photography. What impressed me was the tutorial was not focusing on the post-processing but instead stressed on the importance on scene selection and model's clothing choices. Sometimes, you can't simply post process (photoshop) everything.

How easy to setup development workstation in Ubuntu these days? In seconds, if you exclude the time needed to download all the packages. I've been looking into TypeScript, React, and VS Code these days and it's the right time to setup a new development environment through Ubuntu's Snap.
$ sudo snap install node --channel=10/stable --classic
$ sudo snap install vscode --classic
$ sudo snap install --edge typescript --classic

What is the best approach to read a book? Reading with a pencil  (via HN) or also known as marginalia. The idea is simple, you're basically collaborating with the book author by scribbling down your questions, thoughts, and ideas in the free margin space (limited for some books). In other words, purposeful annotations while reading or active reading (suitable for research papers but not some book genres where you read for leisure).  Also, such reading method is not applicable for ebook reader (yes, reMarkable exists but the steep price does not justify it), which still does not provides a good paper experience for doodling.

Is JQuery dead? Not yet but soon, probably within these few years. Reading through the blog post by Github Engineering on removing JQuery from Github frontend, little have I realized that the frontend (JavaScript) have matured enough to deprecate JQuery. What does this indicates? The web have move beyond the dreadful old incompatible Internet Explorer versions, which the main reason of the existence of JQuery project. What next? TypeScript becomes ES Next (maybe?) and the standardization and popularity of custome web components. One thing for sure, old things will be rediscovered, reimplemented, and rehyped again and again, as usual. Same old same old. (ง'̀-'́)ง

How to teach yourself hard things? (via HN) Alternatively, the Richard Hamming tackled this in his The Art of Doing Science and Engineering: Learning to Learn course and Edward Kmett in his Stop Treading Water: Learning to Learn lecture. Furthermore, comments in HN provides us with a few good gems in area of exercising, programming, or physics. However, this is only applicable for those who are discipline, having intrinsic motivationgood quality sleep, and don't get burn out (you will eventually). In short, learning will come naturally if you interested in tackling the problem itself. Time is limited, pick your battle wisely.

Why Microsoft Word is a better writing tool than LaTeX? Reading through the post by Thorsten Bell on the tools he used to write his book (via HN) reaffirms the mistake I've made when typesetting documents, books, and thesis using LaTeX, ConTeXt, and pandoc. Fancy tools may distract you from doing what matter most, writing itself. If the writing is difficult, we can be sidetracked through fiddling with these tools under the pretense of productive procrastination.That's why, a slow and noisy typewriter (surprise that it's still expensive these days) was such an efficient tool for writing. You can't do nothing else but type or write. Which is why so many distraction-free editors exists in these Interweb days.

Why I still love PostgreSQL after all these years? 100-plus of custome data types (even table and view can be as well) supported in the database itself (via HN). Programming languages can change numerous times for a long maintained systems. Not sure for the database system. Some developers prefer strongly typed programming languages, but they seldom look into database systems with custome data types support.

How do we test web service API through console or command line? (via HN) There are so many choices like Strest, Newman (console version of Postman), shakedown (Bash script), karateDSL, UnRAVL, Artillery, and Tavern (Python-based). Coming from console background, I have preference for shakedown and Tavern due to its simplicity.

To rent or buy a house? HN user isostatic gave a practical answer to this question. Buy if you're investing, having kids, or don't want to be forced to move. Rent if you don't want to maintenance the house.

What is the symptom of midlife crisis in a good way? Extreme athleticism. (via HN) One key point I agree with the writer is that we're preparing for the coming old ages as highlighted in this quote. Interesting days ahead.
...... extreme fitness is less about being young again and more about building yourself up for the years ahead. In other words, getting better at getting older.

This Week I Learned 2018 - Week 36

Old posts from archive or something from last week.

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

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

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

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

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

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

This Week I Learned 2018 - Week 27

Last week post or something from the archive.

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

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

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

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

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

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

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

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

This Week I Learned 2018 - Week 15

Last week post or grab something from the archive.

Travelling. Short and late write-up for this week.


Travis CI and Perl. Some minor hiccup but I managed to get the Continuous Integration (CI) to work correctly. Unfortunately, I can't seem to find a way to test the CI within the local development environment.

The history of React.js. Didn't realize that React have came a long way, since 8 years ago. Yes, you got it right, 8 long years ago! The competition of the front-end Javascript libraries have settled down to either React, Angular, and Vue. Due to some "compelling" circumstances, this is a good time for "reacting" (pardon the pun), and nothing better to start with the fundamental basis (via HN).

"Manage your energy, not your time." How you manage your day (especially the morning) determine the productivity for the whole day, week, month, and year.

This Week I Learned 2017 - Week 52

Last week post and something from the current and previous years.

Last week of the year 2017. Is good to have some reflection by looking back at all the blog posts for the whole year. In total, including this post, I've written 75 posts, 17 more posts that last year. My plan for next year is hopefully even more post but on diverse topics rather than usual technical stuff.

Sedentary lifestyle is still an issue although how much I tried to get more active in my daily life either at my office and my home. The heatmap below illustrates that. Compare to last year, I'm comparatively less active. As you age, metabolism drop and lacking physical activity does impact you health someway or another. One good indicator is you gain more weight. Furthermore, you have to spend more money to buy new cloth. Having a pedometer does help but it's good you can have a weekly review of your daily steps taken. Having a weekly review on the step taken or exercises done is the plan for the next year. Adjustment through adding one or two micro habits into your daily life here. Awareness is the key here.

FOSS contribution? Unfortunately, still nothing much even though the daily commit streak was there. Is an ongoing battle on what to work on and pushing the first commit ahead. Although I've tried to created a few new project but didn't pursuit much ahead. My weekly reflection indicated that trying to do too many stuff at one time will make you overwhelmed and nothing much get done. The usual Analysis Paralysis symptom. Adjustment for 2018? Keep the daily streak but be more focus and set priority on what you want to do. Finish what you plan to do. If you can't, delegate or postponed it to a scheduled date, and move on to something else.

And this is how I plan to do in coming year of 2018.

Enough rambling, back to the usual stuff.

What did I miss? That probably the most important question you should either ask yourself or the domain expert in the pursuit of improving or mastering your craft. I've long seek the answer to this question. How good can you be? What is your threshold of your skill? The book The Talent Code did provide some answers (one of it is practice or the way how to practice but there is more to that). However, the missing piece is still how to sustain the curiousity to move forward, especially you've done the craft long enough and stuck in the "same sh*t different day" or "been there done that" mindset. This is very true when comes to software development where each year, some new techs were "rediscovered" again and again. However, this does not apply to professional sport where your genetic and age will play a crucial role in advancing your craft.

In MySQL, ON DELETE NO ACTION is the same as NO ACTION RESTRICT. Yet another quirk of our beloved MySQL database. Compare to the standard SQL or other real databases,  InnoDB storage engine does not supports deferred check, meaning that you can take no action on deleting a record during a transaction and resolve it before completing the transaction. Yay! Embrace the powerful feature of MySQL!

React is the future, inevitably you have to embrace it and add it to your front end development stack one way or another.

This Week I Learned - 2017 Week 47

Last week post or random stuff from the archive.

Certain kind of food and my body does not like each other. Age related issue or just simple bad food? On the bright side, got the well deserved rest. More travelling. I can check off one item in my bucket list. Write it down and make it happen.

Never let an inexperience personnel to change your guitar strings. Sloppy works causing the guitar can't stay in tune. How to get the new guitar string to stay in tune then? Just two simple ways. Stretch all guitar strings either vertically (YouTube) or horizontally (YouTube). If this still fail, then you have intonation issue, which is quite tricky to fix or some other problems.

Numerous people have recommend Nujabes, some claimed he is the father of chillhop. Definitely worth adding this genre to your daily playlist.

The fake Facebook profile industry. (via HN). Even in the early days of IRC chat. Social engineering at its best.

What are some interesting papers in CS for a beginner? So many papers to read yet so little time.

Probably the biggest unnoticed item in the cloud right now. AWS have shifted the hypervisor used for the AWS cloud platform, from Xen to KVM. While is may seems like a blow to Xen but there is another new virtualization solution based on Xen called LightVM.

Example of implementing a web development stack based on microservices. (via HN) Overly and unnecessary complex? Perhaps but it serves as a good example of what can be done but not really recommended.

Don't have proper exception handling in Perl? Use eval() then. I finally grok this `eval()` thing in Perl. Example as shown below.
eval {
     # code that might throw exception
     1;  # always return true to indicate success
or do {
    # this block executes if eval did not return true (bacuse of an exception)

    # save the exception and use 'Unknown failure' if the content of [email protected] was already
    # removed
    my $error = [email protected] || 'Unknown failure';

    # report the exception and do something about it

"Just use jquery. In a few years jquery will be rediscovered and praised all over again." While I don't think this is possible but it's funny as hell.

Fricking annoying preview mode in Visual Studio Code. Disable it.

React control and uncontrolled form inputs. Good for beginner to start with React.

That really says a lots about Silicon Valley, especially the part on a peculiar form of McCarthyism.

This Week I Learned - 2017 Week 29

Last week post or some ramblings from the past.

The quest of finance independence will influence or make your adhere to different life principles. Minimalist life style, waste free, child free, debt free, and other approaches. Some of these deliberate choices may against the normal social norms. Is all depends on how aggressively you want to proceed ahead. The biggest obstacle is consumerism, especially in this digital age. Reducing your social media usage (yes, this includes normal Internet surfing) is a good start.

Interesting part that the WiFi extender cannot connect through 5GHz because certain countries does not support channels other than Band 1. It's quite confusing where extending your WiFi coverage if you're using the same SSID as you have to check the BSSID to differentiate which SSID you're currently connecting to. But one thing for sure, I definitely love `nmcli` console tool, probably my favourite software. Always gave me the hidden surprise of its usages and features.
$ nmcli -f BSSID,ACTIVE dev wifi list

Nostalgia bucklespring keyboard sound. Instead of spending a fortune in getting the real physical keyboard, just install the software and enjoy the emulated sounds. Good for the electric typewriter I was thinking of setting up using the underutilized Raspberry Pi.

Chinese cleaver (菜刀), compare to other similar type, is a general purpose kitchen knife.

"We receive subsidies from the government." (more write up from MiniMachines). Now we know why Orange Pi is so cheap, everything is sold as Bill of Materials (BOM) price. It would be nice if the software support is better.

Why you should not use React now due to the the BSD+Patent license issue. Partially open source but with patent grant issue tagged along. Are we going to see more PATENTS file issue in coming future?

"Being unwilling to adopt a necessary amount of structure and process is just as much of a hindrance once you hit a certain size." Full context of the discussion. The observation when you organization reached certain size where formal process is unavoidable. Yet, people are still making the same old mistake over and over again.

Using Linux kernel >= 4.9? Switch to BBR TCP to control the network congestion and increase your Internet speed. It seems to increase the download speed tremendously. Alternative and more detail explanations from APNIC and ACM Queue.

The secret passion of Git checkout. Funny but very well-written guide on using Git checkout. Meanwhile, use rebase by default, if possible for all your branches. While we at it, user `merge --no-ff` if possible because we want to preserve the branch history.

Kindness is underrated (via HN). Being polite, empathy, professional, helpful, or kind? Neither one will get the message across if the receiving end fails or unwillingly to listen. I totally agree with the comment, "On the internet, nobody can hear you being subtle".