Showing posts with label writing. Show all posts
Showing posts with label writing. Show all posts

This Week I Learned - 2017 Week 38

The usual stuff or last week post.

Long weekend holidays. More rest and clean up.

Fluff in Scientific Writing by Celia M. Elliott (PDF). Right, I definitely write in a fluff way. Awareness is the first step to improve your own writing.

So you have a pair of passive speaker. What now? The next step is to get a DAC and an amplifier. Or you can get a Class-T amplifier with build-in USB DAC and headphone amplifier combo like Topping TP30-MARK2. The USB DAC let the amplifier serves as an external sound card so you can channel out the sound from your PC through the USB.

As I learned in the last week post, the quality of any amplifier is the whole sum of its electronic components, especially the amplifier chip and capacitors. Screenshot below illustrates the PCB board and its components. Unfortunately, the amplifier chip is Tripath TA2024, which push about 15 watts per channel, a bit lacking for bookshelf speakers.

SMSL SA-36A PRO, while it's a affordable and quality amplifier, has two different versions. To save cost, the manufacturer have switch the amplifier chip from Texas Instrument TPA3118D2DAP to STMicroelectronics TDA7492PE. The general consensus from the reviews and forum discussions recommended to get the TPA3118 version. Maybe the SMSL get a better pricing from STMicroelectornics or Texas Instrument cannot keep up with the demands. This also reminded me of certain manufacturer which produced quality and affordable first generation of said product to get good rave reviews and slowly replace with cheaper components for next generation.

Unfortunately, SMSL SA-50 is currently out of stock and I can't find it in the SMSL website. Maybe SMSL decided to phase it out from the market? What about SMSL SA-60? It's not shown in the official website as well.

Neurochome's LM3886 done right? The correct amplifier design compare to others like Circuit Basics or Electronics Lab. I believed Tom Christiansen's experiences at Texas Instrument allows him to design the most optimized audio amplifier using TI LM3886 amplifier chip.

YouTuber FFcossag channel is what I consider good review, teardown, and educational on a particular amplifier. Good example was how he evaluated through the specification of Breeze Audio TPA3116 as shown below. Even better, his videos are in public domain! While we need to absorb and digest large unknown information, his does provides a quantitative (objective) rather than qualitative (subjective) analysis of an amplifier. Sometimes, it sounds nice to the reviewer is a personal taste.

While we're on Breeze Audio. Be extra careful when you plug in the power supply. One reviewer, NFM popped and burned one of the capacitor while testing it. Luckily he was protected by the aluminum case. Be extra careful with all these low end amplifier, supply lower power to the amplifier or you switch the capacitors to a higher voltages type. It does raises quite a lot of safely concerns with all these low cost amplifiers (no quality control, cheap or cloned electronic components) from China.

FFcossag also provides another excellent objective review on popular Lepai LP-2020A+. See video below. While the amplifier is way under-power compare to what the manufacturer claimed in the spec sheet, it's still value for performance worthy amplifier. However, the same problem exists. You can't bloody get this amplifier in MY and have to try your luck sourcing it from China.

Similarly, he also trashed the Lvpin LP-838 and make the consumer aware of what are they getting of buying a cheap amplifier. To save cost, certain manufacturer will reuse or recycle certain components. Is it safe? Hard to tell but it certainly does not increases any confident (more on this later) in using the product. Be an informed buyer, buy from reputable dealer and brands.

Coursera - Writing in the Sciences - Week 2

Continue with week 2 study. Notes as follows.

2.1: Use the active voice
An active voice is a type of sentence that follows a format of subject-verb-object. Or it's the way we normally talk. Example as shown below.
She (agent) throws (verb) the ball (the recipient).

For passive voice, is the reverse which follows a format of object-verb-subject. Rewriting the above sentence as passive voice.
The ball (recipient) was thrown (verb) by her (agent).

Alternatively, we also can remove the agent. The sentence below does not tell us who throw the ball.
The ball (recipient) was thrown (verb).

Passive voice is useful when we're want to exclude the recipient. Good example is shown below where to evade any admission or person responsible.
Mistake was made.

How do we recognize a passive voice? Identify "to be" verbs in the sentence. "To be" verbs are weak and wordy and you can replace them with stronger verbs. List below shows the step-by-step guide to eliminate "to be" verbs.

(1) Identify
(2) Substitude
(3) Convert
(4) Change
(5) Combine

The restaurant’s parking lot (is) narrow.
(There are) not very many parking spaces and those (that are) available (are) too cramped.

The restaurant (suffers) from a narrow parking lot with only a few cramped spaces.

To convert a passive voice to active voice, ask yourself this question. "Who does what to whom?"

Active voice have several advantages as listed below.

(1) Emphasis author responsibility.
Why passive voice is prevalent in scientific papers? Because first-person pronouns (I/We) usages should be kept to a minimum. In method section of your paper, you're encourage to use passive voice as what have been done is far more important that who done it. APA (The American Psychology Association) have different opinions on this. More on this in next module.

(2) Improves readability.
I like the example below because it shows we can skip first-person pronouns.

A strong correlation (was found) between use of the passive voice and other sins of writing.

(We found) a strong correlation between use of the passive voice and other sins of writing.

(Use of the passive voice) strongly correlated with other sins of writing.

(3) Reduces ambiguity.

2.2: Is it really OK to use "We" and "I"
Is using personal pronouns like I/We in scientific writing acceptable? Based on her explanation, it's okay to do so although some said not using personal pronouns make your writing more objective.

However, different journal have different opinions on using personal pronouns. Check the publication style guides you are submitting to and follow its guidelines. For example, the style guide of Science Magazine recommends:

Use active voice when suitable, particularly when necessary for correct syntax 
(e.g., "To address this possibility, we constructed a λZap library . . .," 
not "To address this possibility, a λZap library was constructed . . .").

Note to self. Do search and read up these style guides. Start with the The Element of Style that you've bought few months back.

2.3: Active voice practice
Some practices on converting paragraphs from passive voice to active voice. Pretty much quite straight forward. One of the key or first step is to recognize passive voice is to find these keywords : be, is, are, a, was, were, has been, have been, will be, and being.

2.4: Write with verbs

We must follow three rules.

(1) Use strong verbs.
When you have limited vocabulary, your writing is boring. One way is to expand your vocabulary. But how? Read a lot, really a lot. I like this approach of treating every read is a write to expand your vocabulary. The example shown in the lecture exemplified this point. Pay attention to the verb. Compare the verbs. See how using strong verbs change the tone of the sentence.

Note to self: Expand your vocabulary. Read and write more.

"Loud music (came) from speakers embedded in the walls, and 
the entire arena (moved) as the hungry crowd (got) to its feet."


"Loud music (exploded) from speakers embedded in the walls, and 
the entire arena (shook) as the hungry crowd (leaped) to its feet."

One good way is to identify and underline all the "to be" verbs like is, are, was, were, has, been, am, and others and replace with with stronger and more vivid verbs. Example of boring usage of "to be" verbs as shown.
"She is an excellent scientist. Her research is top notch. Her experimental
technique is also beyond compare."

(2) Avoid turning verbs into nouns.
Again, another example where I always use in my writing. Using nouns instead of verbs. Why using now is not recommended? It lack the impact of using a verb and may lead to ambiguity.

Let's start with the example given.

"During DNA damage, (recognition) of protein one by protein two results in (recruitment) 
of protein three and (repression) of cell proliferation genes."

"During DNA damage, protein one (recruits) protein two and protein three, which together 
(repress) cell proliferation genes."

(3) Don't bury the main verb.
Another good example here where the subject and the main verb (predicate) close together.

"(One study of 930 adults with multiple sclerosis (MS) receiving care and one of two 
managed care settings or in a fee-for-service setting) (subject) (found that) (predicate) only 
two-thirds of those needing to contact a neurologist for an MS-related problem in the prior 6 
months had done so."

"One study (found that), of 930 adults with multiple sclerosis (MS) who were receiving 
care in one of two managed care settings or in a fee for service setting, only two-thirds of those 
needing to contact a neurologist for an MS-related problem in the prior six months had done so."

2.5: Practice examples
A few rules while going through these examples.

(1) Don't use long subject
(2) Don't use buried, boring predicate and passive verb.
(3) Don't turn verb into noun.
(4) Don't use negatives words
(5) Don't use "hedge" words.
(6) Don't use "fluff" words. For example, very, important, and others.

(The (fear)(3) expressed by some teachers that students would (not learn)(4) statistics 
well if they were permitted to use canned computer programs)(1) (has (not been)(4) realized)(2). 
(A careful (monitoring)(3) of achievement levels before and after the introduction of computers 
in the teaching of our course)(1) (revealed)(2) no (appreciable)(5) change in students' performances"

"Many teachers feared that the use of canned computer programs would prevent 
students from learning statistics. We monitored student achievement levels before and 
after the introduction of computers in our course and found no detriments in performance."

The whole exercise makes me want to pick any scientific papers out there and identify and issues and rewrite it. As I love to read papers, this should be quite an interesting writing exercise.

2.6: A few grammar tips
And I thought I was aware of these grammar rules.

(1) Data is plural.

(2) Affect and effect.
Yes, the RAVEN (Remember Affect Verb Effect Noun) rule is not entirely correct. We can use the word affect as a noun and the word effect as a verb.

(3) Compare to and compare with.
Compare to is used to compare similarities with different things.
Compare with is used to compare differences with similar things.

The bike that is broken is in the garage. (one bike out of many bikes)
The bike, which is broken, is in the garage. (regarding one particular bike)

(4) That and which.
That is a restrictive pronoun.
Which is a nonrestrictive pronoun. Meaning that the word is optional and if you remove it, does not change the meaning of the sentence. Also, there is a comma, before the word.

Learning Objectives
(1) Distinguish between active and passive verbs.
When to use passive voice? When you're asking a questions!

(2) Practice writing with strong, active verbs.
As I was going through the week 2 course, I tends to write more in active voice rather than passive voice these days. Surprising to find that I use more passive voice than ever in my writing. While changes is inevitable, I still struggle to adapt to the new writing and constantly needs to remind myself to write in active voice.

(3) Fix sentences where the subject and predicate are too far apart.
Definitely something new for me and I don't even realize that.

(4) Correct specific grammar mistakes.
I can't remember what I've learned here.

Coursera - Writing in the Sciences - Week 1

Writing is always hard for me. I always feel this invisible gap of what you want to say and how it's conveyed down in writing. Six years ago, around 2011, frustrated with this gap, I've started writing through blogging. Even since, writing have become a way for me to express my understanding in my learning as well as a medium for me to unwind (mindless ramblings). These days, while writing becomes more natural but still crappy, I still exploring numerous ways to improve my writing.

Last Thursday, I received an email from Coursera that the course Writing in the Sciences, taught by Dr. Kristin Sainani is currently opened for registration. Since I have a long holidays ahead, might as well make good use of the free time and pick up something useful along the way.

Below are some of the key points and additional notes of each module in week 1.

1.1: Introduction; principles of effective writing
What is good writing? Effective communication between the writer and the reader. And how do we achieve effective communication? Simple writing. While we want to sound smart, elegant, and stylish through our writing, the priority should be on getting your message across in a clear and effective manner. If the reader cannot understand what you're trying to say, then the writing does not serve its purpose.

Good writer have something to say, something they passionate about. In other words, good story teller. When come to scientific writing, you will need logical and clear thinking. Read anything. Read what professional wrote. Study, learn, and imitate their writing. Superhuman by Habit is the first book I can think of which have simple and clear writing. Contrary to popular opinion, I can't say much about William Zinsser's On Writing Well.

If we write like how we talk, then the writing will be in more simple and conversational tone. Academic writing is totally opposite of that, more formal and wordiness. However, talk about something before writing it down is also a good approach. As you can treat your conversation as your first draft.

Reevaluate and rethink your approach to writing as well as the writing process. Elegant and stylish writing have to go through numerous edits and revisions. You just can't get it done in one shot. Don't worry about getting your writing done right the first time. You can't. Nobody can. Even professional writer. There is no such thing as get it done right the first time when comes to writing!

Focus on revision instead of the initial draft. Get your first draft done as soon as possible. Forget grammatical rules or spelling errors. Just churn it out. Next, start the revision process. Be ruthless and cut all unnecessary words. Repeat this process until there is nothing else to remove.

1.2: Examples of what not to do
How to evaluate good writing? Ask yourself these questions. Is the writing easy to to understand? Is the writing enjoyable and interesting to read? If not, you reader will not care.

Grammatical Normalization, a fancy word where a verb, an adjective or an adverb is turned into a noun. The side effect of writing in such way are wordiness and can irritate the reader. For examples,

Unnecessary nouns:
Bad : We have a discussion on that particular incident.
Good : We discussed on that particular incident.

To-be verbs:
Bad: There is this restaurant that attracts all the tourists.
Good: This restaurant attracts all the tourists.

The lesson learned here is don't start a sentence with "There is ......", "There are ......", or "It is ......". Be aware of this during revision.

1.3: Overview, principles of effective writing
The preference to use verbs instead of nouns in writing may sounds formal but hard to read. Clear writing prefers verbs over nouns. During revision, identify those nouns in a sentence. Look for any words that end with -ion, -ment or -al.

Be specific. Be careful with your word choices that leads vagueness. In scientific writing, if you are experimenting on a particular type of fish, name the fish directly.

Don't use acronyms unless it's necessary and generally known.

What are the principles of effective writing? 

(1) Reduce wordiness. Cut unnecessary words or phrases.
(2) Use active voice (subject + verb + object).
(3) Writing and using strong verbs instead of nouns.

1.4: Cut the clutter
These two examples illustrate how we going to cut the clutter. Read aloud yourself.

Several issues were found with these examples.

(1) Verb turned into noun.
(2) Vague amorphous words.
(3) Repetition or repeated words with the same meaning.
(4) Stylistic or better word choice.

Example 1:
"This paper (provides a review)(1) (of the basic tenants of)(2) cancer biology study design, using as (examples studies)(3) that illustrate the ((methodologic)(3) challenges)(2) or that (demonstrates)(3) (successful solutions)(3) (to the difficulties (inherent in biological research.)(3))(3)"

So after revision, the rewrite looks like this.
"This paper reviews cancer biology study design, using examples that illustrate specific challenges and solutions."

"successful solution". Do we need the adjective here? Dr. Kristin raised the question whether there exists an unsuccessful solution? Because solution implies successful.

One key point that relates to my writing is that I always use different words to explain the same things but in different way. For example, to buy or to acquire. Pay attention to the grammatical conjunction of and/or. Something you may not even need it. Most of the time, I just want to make the sentence longer, thus causing wordiness. As Dr. Kristin said, just use the important words to get the idea across.

Example 2:
"(As it is well known)(3), increased athletic activity (has been related)(4) to a (profile of)(2) lower cardiovascular risk, lower blood pressure (levels)(3), and improved (muscular and cardio-respiratory performance.)(4)"

The phrase "As it is well known" is known as Throat Clearing Phrases, which is a long and unnecessary introductory phrases at the beginning of the paragraph. According to Dr. Kristin, just put a citation at the end of the sentence if you want to indicates that certain idea is well known. Some examples of these dead weight words and phrases:

(1) As it is well known ......
(2) As is has been shown ......
(3) It can be regarded that ......
(4) It should be emphasized that ......

After the rewrite.
"Increased athletic activity is associated with lower cardiovascular risk, lower blood pressure, and improved fitness."

Another more aggressive rewrites using strong verb. Notice the two "and"s. (emphasis in bold)
"Increased athletic activity lowers cardiovascular risk and blood pressure, and improves fitness."

Example 3.
"The (experimental demonstration)(3) is the ((first of its kind)(3). And is (a proof of principle)(3))(4) (for the concept)(3) of laser driven particle acceleration in a structure loaded vacuum."

"is" is a boring verb. You can replace dull verbs with vivid verbs.

After the rewrite.
"The experiment provides the first proof of principle of laser-driven particle acceleration in a structre-loaded vacuum."

The main point of this module is to cut unnecessary words. Sometimes, it's good to take a break from working on your draft. Take a break and review back a few days later. We have invested so much time in writing and may hard to part with what we have written.

Also, take note of adverbs, for example, very, really, quite, basically, generally, and etc. If you write like the way you talk, you will subconsciously add those adverbs in your writing. Adverbs is not suitable for scientific writing which needs precision.

1.5: Cut the clutter, more tricks
Several more tricks have been added in this module. These are:

(1) Eliminate negatives
If you see a sentence like "He did not win the match". We can rewrite this in positive manner like "He lost the match". The first sentence is a negative sentence where the reader have to identify the key first (win) and then negate it (did not). The second sentence is more affirmative and concise. Some more examples:

Negative            Affirmative
Not honest         Dishonest
Not harmful       Safe
Does not have    Lacks

In other words, if you found any "did not" or "not" words in your sentence, consider rewrite it to be more affirmative.

(2) Eliminate superfluous uses of "there are/there is".
Most of the time, "there are/there is/there was ...... that" is unnecessary. For example,

Before: There are many ways in which we can arrange the pulleys.
After: We can arrange the pulleys in many ways.

(3) Omit needless prepositions.
Use "that", "on" or other prepositions with care. Overuse of these prepositions leads to wordy sentence.

Before: They agreed that it was true.
After: They agreed it was true.

1.6: Practicing cutting clutter
This example below illustrates one of my common mistake when writing papers.

Before: As we can see from Figure 2, if the return kinetic energy is less than 3.2 Up, there will be two electron trajectories associated with this kinetic energy.

After: Figure 2 shows that a return kinetic energy less than 3.2 Up yields two electron trajectories.

Review Learning Objectives
Review back the learning objectives with my current understanding of the notes and writing approach.

(1) Recognize that writing is hard for everyone.
I've written about this in previous paragraph and all my previous notes.

(2) Recognize that writing is a skill that you learn through practice.
My approach is always quantity over quality. Since I've already built up a weekly habit of writing about stuff I've learned for the past week, maybe it's time to adapt my approach by focusing more towards quality over quantity. Not just random rambling writing, just deliberate writing practices.

(3) Practice removing clutter from writing.
Revision, a crucial step missing from my writing process. I always publish the draft copy as soon I've finished writing. Furthermore, wordiness indicates a false sense of importance. Also, sometimes we need to write to a certain number of pages or words. Hence, to meet the requirements, you have to pad your writing causing wordiness and leads to bad writing habit. However, Enjoy and appreciate the elegance of brevity.

(4) Practice writing clearly and concisely.
Word choice. I need to work on this.

This Week I Learned - 2017 Week 25

Last week post or you can explore the archive.

Writing and nothing but writing. Imagine starting from 8 in the morning until 12 in the night, minus the eating time and occasionally short breaks, you have to write up something to fill the remaining 12 pages. Staring at the monitor for 16 hours non-stop will definitely depleted you and causing much stress, especially to your eyes. The sudden and urgent feedback caught me by surprise. Totally messed up my daily routines. The aftermath of this last minute changes is you have become wordy, like one of those week I've experienced before. Therefore, this week blog post will be a bit wordy than usual.

One hard lesson I've learned during this writing period, reading and lots of reading is essential for writing. There is no way for you to churn out anything fast, if you don't even have a clue on what you're going to say. Want to be a better writer? Be a better reader. Reading a technical paper and a fiction requires different strategy. The former needs a systematic and structural way of extracting information. The later, you just need to use your imagination and indulge with it.

Another one. Statistics is very important, far more practical and relevant than other branches of mathematics. You never know when you going to need it, but when you do, you really do! Time for relearn and pick up some statistics.

The next lesson? I think I finally and partially understand what the heck is methodology, which in short, a set of practices or procedures. To explain in another way, a step-by-step procedure on how you going to tackle a particular problem. Particularly, you have to explain when, where, and how you're going to carry the procedures. It changed how I read, understanding, and absorb information. In the end, all the details, some ways or another, are transformed into a flow chart.

Back to the regular weekly ramblings.

Via Reddit. World oldest gymnast, Johanna Quaas, 91 years old to be exact. Nothing but good genetics, healthy and active lifestyle, be independent, and how to age gracefully. There are so many ways your body will let you down and kill you when you age. Genetics aside, which is out of our control, this is definitely doable, you just need to have the persistent and patience to do it. Seems that cycling is preferable than running, if you don't want to damage your knees due to running.

Do you plan your next day ahead? I've been facing the same problem in organizing my life. It's a long tedious process of trying different organizational systems (Four Quadrants / Eisenhower BoxGTD, Bullet Journal, and Pomodoro) to see which one sticks. Typically, nothing stick for a long time, after a while, you will drifted away and back to your old self. The main issue procrastination. You're aware of the priority, but don't feels like doing it. Then it dawned to me that time management is actually mood or mind management. If you need to to something important, schedule it at the time where mentally you're most alert and aware. For example, early in the morning when you first woke up is probably the golden hour of productivity.

Maybe the mentioned systems are way complicated as it can lead us to overly micro planning. Remember, there is no one true system, it's a mixed of everything with some adaptation. Why not going analogue and low tech with a simple pen and paper. Jot down your to-do list, prioritize, try to get things done within that day will work. Not every day is a perfect day. Accept it. Not everything will be completed within that day. Reschedule the unfinished tasks to the next day. For more refinement, break the day into four sessions of morning, afternoon, evening, and night.

Regardless how you optimize your day, the first thing is to plan ahead, way ahead like life goals from 6 months to 30 years. The longer the planning, the more you will aware that most things don't matter that much in life eventually. I agreed with the poster's four assumptions, especially that "productivity is getting the most important things done" and "most people don't have that many things they truly want to accomplish.".

Classic Papers: Articles That Have Stood The Test of Time. Collection of ten most cited papers from different area of research. Unfortunately, only from 2006. It would be nice the paper can be extended from far longer before 2006, say from 1900. Interesting found was this paper, Who should fix this bug? where the author was using machine learning to semi-auto assign a reported bug ticket to the a developer.

LaTeX, where what is hard is easy, and what is easy is hard. Editing LaTeX file with Vim? Plenty of errors that you probably needs to amend to make it go away. Generating PDF file and the page dimensions seems off? Readjust the page margin dynamically. Sigh. No matter how much I love typesetting, the hassle and effort of tweaking the layout is not worth the time.

When using Git, branching is easy and cheap. Two things that I need to use quite often when merging changes from different branches. First is create more throwaway branches and squash merge using the `--squash` parameter. Second is cherry picking using the -n parameter. Both ways do merge but not commit the changes.

This Week I Learned - 2017 Week 23

Last week post or the stuff from the archive.

Busiest week ever. Spent lots of time tidy up all the loose end. Non-stop churning out words after words for the past few days depleted me both mentally and physically. Having to write the same thing again and again but in different ways exhausted me further. Nevertheless, it was an "interesting" experience. Cognitively it was challenging but your learn a lot at the same time. However, if the knowledge gained will be forgotten later, then why we need to pick up it in the first place?

#1 On work ethic. Emphasis added.
Work ethic is about showing up, being on time, being reliable, doing what you say you’re going to do, being trustworthy, putting in a fair day’s work, respecting the work, respecting the customer, respecting the organization, respecting co-workers, not wasting time, not making work hard for other people, not creating unnecessary work for other people, not being a bottleneck, not faking work. Work ethic is about being a fundamentally good person that others can count on and enjoy working with.
#2 Iomega's Zip drive. We used to own one and have a few disks lying around. Not sure what happened to it. But one thing for sure, recordable CD, which was superseded by DVD, and USB thumb drive really killed the product. I still can't remember what we used it for, maybe just to backup all our downloaded files?

#3 Best possible reason on why Intel is not putting any significant efforts or buying more times on tackling AMD's Ryzen Threadripper. Intel and Microsoft have completely missed or failed the mobile market. If Intel cannot produce anything that match up ARM's mobile market dominance, we will see a significant shift of Microsft from x86 platform to ARM. 

#4 Writing journal is the art of talking to yourself silently. However, the correct approach to journaling is to focus on both cognitions and emotions will have the best benefits. I was contemplating of getting an actual typewriter to switch to more manual way of writing but the cost of the typewriter is surprising expensive, roughly more than MYR500. You probably can buy a very decent second hand computer with that pricing. There exists also Freewrite, a digital version of distraction free typewriter, sort of. Or the predecessor, the Alphasmart Neo or the retro looking Cambridge Z88. However, the pricing is just ridiculous! Why not spend the money on getting a second hand laptop like a used ThinkPad instead? Heck, might as well just switch to pen and paper instead.

#5 Productivity is less about time management than it is about mind management.. Profound insight. Basically is all about "hacking" your brain and getting it to a desired state.

This Week I Learned - 2017 Week 13

Read the last week post or follow the whole series.

Night owl turned early bird messed up my sleep cycle badly. Nevertheless, the draft report have been completed and waiting for submission.

#1 Feeling nostalgia after watching the unboxing video of IBM PC AT and Model M. The sounds of the diskette reading and loading the data reminded me of the good old days of early computing period. I'm not sure what happened to our XT 8088 but I'm surely wish I can see it again and try to boot it up again. I did once during my college days but would really love to do it again after all these years. Back in those days, XT 286 is my dream machine and how I wish we have the financial means to upgrade to it. 

#2 Lots of Docker debugging for the past week and I learned quite a lot. It's the right time to setup my virtualization machine (more on this in coming week) and start looking into Docker.

When using Docker Compose, use `docker-compose ps` instead of `docker ps`. While both commands show the listing of the available containers, the former command will only list containers declared in the `docker-compose.yml` file, a subset of the all available containers. Best to go through all the Docker Compose CLI command line parameters.

Next, you want to read (or search) the content of a file in the docker container. See the example below. Yes, I know you can just simply use the `grep` command directly.
$ docker exec -i mycontainer cat /etc/hosts | grep localhost

#3 Setting up multiple SSL certificates using one IP address in Nginx. And also how to verify and read SSL certificate info from the console. Next is to configure Google Chrome to accept invalid certificate from localhost. Copy and paste `chrome://flags/#allow-insecure-localhost` to the address text box to access the setting. Instruction as shown below.

This Week I Learned - 2017 Week 10

Last week post or just follow the whole series.

Got my result today. It seems I've officially "crossed" the borderlines stage. I'm still contemplating on the next step but drastic life style changes is inevitable (more in item #5). If left untreated, it can grow into bigger problems, not only for yourself, but for your loved one as well.

#1 You May Want to Marry My Husband (via HN). Beautifully written. We need to be constantly reminded of the fragility of life especially contemplating one's mortality. The lack of awareness will bite you and your loved ones somehow in the future. Over 30-something and still bogged down by random trivialities in life? Nothing but continual reflection on your life priorities (often misplaced) and gratefulness helps to make peace with current and past self. Regrets? Yeah, plenty. Who doesn't? But not to a point where you will lament later in life that you should, would, or could. Wish you've taken a different path? Nah. I'm good. Yes, there is still room for improvement. Looking forward to that.

Further reading. The 10 Best Modern Love Columns Ever.

#2 On Perl. Interesting thing learned. How do you clone a hash and at the same time, reassign new values to some of the existing keys? Simple and yet so effective. To explain this,  `%$foo` expands expands the hash into a key-value pair and the curly braces (anonymous hash constructor) will create a new hash reference. Output is from Devel::REPL module, the modern Perl interactive shell.
$ my $foo = {a => 1, b => 2, c => 3};
\ {
    a   1,
    b   2,
    c   3
$ my $bar = {%$foo, a => 4, b => 5}
\ {
    a   4,
    b   5,
    c   3

Instead of just doing this.
$ my $foo = {a => 1, b => 2, c => 3};
\ {
    a   1,
    b   2,
    c   3
$ my $bar = {%$foo};               
\ {
    a   1,
    b   2,
    c   3
$ $bar->{a} = 4;
$ $bar->{b} = 5;
$ $bar
\ {
    a   4,
    b   5,
    c   3

#3 Carton. Bundler for Perl. In other words, module dependency manager for Perl. Is Perl a lost cause that only a few diehard users still using and maintaining it? Seems likely to me.

#4 Ship daily. That probably the way to get your side project moving and don't feels like you're not completing anything. Can't do it? Maybe you're setting the bar too high and setting yourself up to failure. Of course, some are created to be thrown away. While I don't totally agree on the needs to to finish all your side projects, but when comes to actual paid work, we need rethink our role. Instead of a programmer, think yourself as a problem solver instead. A tiny shift of that mentality will get you closer to the deliverable.

#5 Getting older? Getting weaker? Maybe you should check your weight and measure your Body mass index (BMI)? If so, you should to readjust your diet. Stop eating like you're in college days. More (not just) portions of fruits and vegetables? Furthermore, be informed and mindful of what you put inside your body. Of course, exercise is needed as well. However, exercise alone does not lose weight. Joao Venture have experienced weight lost by reducing most of his sugar intake and maintaining 3 km daily walks per day. Using this calculator, 3 km is 3937 steps, rounded to 4000 steps. Those who works as software developer with sedentary life style, it's a struggle to reach 4000 on daily basis.

Looking through my steps count below, both my mean and median are roughly around 3000 to 4000 range. This fulfill at least one of the criteria. The next step is to adjust my diet by reducing my sugar intake. Interestingly, since the beginning of 2017, I only manage to hit 10000 steps only four times!

On a related note, sleep is also a crucial factor as well. What Kind of Sleeper Are You?

#6 The Unofficial MySQL 8.0 Optimizer Guide. The section on profiling is interesting and I really don't have time to go through each item on databases I'm working one. Definitely going to improve any legacy and messy databases.

#7 When comes to programming, some of us still missing the point that we're a problem solver first and a programmer second. Follow a process and the convention. Prioritize. Keep the solution simple (yes it maybe boring) and don't try to do things the fancy way unless really, really necessary.

This Week I Learned - 2017 Week 05

Last week post or whole series.

Always an interesting CNY holidays. The flood was not as worse as it seems. The weather is good and the air, seems cleaner. I've managed to get some good rest and deep sleep (more on this in #4).

#1 Canonical have launch Ubuntu tutorials, a step-by-step guideline for setting up development or devops related activities. I was surprise that they started the tutorial using Intel Joule 570x (their answer to IoT?) as the reference hardware. With a price tag of USD 369, I failed to see how this development kit is going to gain any traction when compare to Raspberry Pi. Maybe the target audience is not the Maker community but the industry?

#2 I've bought TI MSP430 development kit to learn more about embedded programming. So far,, the only thing I learned is microcontroller or MCU is "computer on a chip" or also known as System on a chip (SoC). Compare to the Arduino, Raspberry Pi, or Beageboard, it's way more low-level and cheaper. Once I've done with this, the next SoC that I will get is the ESP32, the successor to ever popular ESP8266. For the time being, the next step is introductory write-up on the hardware, setup the development board, testing the serial communication, go through the tutorials, and follow these four things to do with new microcontrollers.

I've noticed that there is this M430F1612 chip (square shape) on the launchpad. Feature-wise, it's similar to MSP430G2553 (rectangular shape) but was used for debugging purpose via JTAG from our computer.

I was thinking on getting more MSP430G2553 and stumbled upon this site, FindChip, which can search through all the popular electronic parts resellers. Note that the search links does contains affiliate links. But is a good way to find available stock and prices in one place.

#3 Are we over-dramatize our life or why people need drama in their life? Sometimes, no news is good news. If you ever complain about boring and simple life, you've been trying to mold your life according to a fairy tale. Follow your dream is such a clichéd pieces of advice. Too abstract and too vague. Be more specific, for example, stay healthy by exercising for 30 minutes on 5 days a week.

#4 Interesting idea on restricting exposure of lights can affect your sleep patterns. I've been living in the city for many years and my exposure and computing usage (you brain is kept active and Melatonin production is delayed) have somehow affecting my sleep cycle and thus my health. Maybe I should switch to something like Philips Hue Bulb? Need to readjust my time and remember, bedroom is for sleeping. Is okay to have TV in the room, just for the sake of white noise. Maybe because there is a healthier life without Internet. Remember, there is way to get you hook on an app or site. Off course, there is antidote to that as well.

#5 "Short answer, It doesn't. Long answer, It does not." Regardless the context of the discussion, the comment is both humourous and fscking brilliant. There is a similar saying as well. "To make it short, is a long story". Maybe we should invest our time in writing? While we on writing, be careful when you use the pharase "duly noted". It usually means "heard and ignored" in a sarcastic way or if you add an extran 'l', it becomes "dully" noted, which means you "barely" acknolwdge. To prevent unnecessary misunderstanding, replace it with "Got it, thanks!" (informal) or "Noted, and thanks!" (format).

This Week I Learned - 2016 Week 37

Last week post or the whole series.

As we're moving to the end of the third quarter of the year, more things pop up for me to follow up. Interestingly but not surprisingly, life is as monotonous as ever. Yes, it can be routinely, but that probably the only way, through sheer discipline, to follow through your plans.

The components for setting up my homelab using AMD 5350 have been bought and set up accordingly. The only remaining tasks is to install the necessary OS and configuration. More writeups on this in coming future.

As usual, something I learned this week.

Looking into Makefile, specifically GNU MakeExtracting parameters from target? Yes, is doable but it's not pretty. See code below. If your target is not an actual physical file, make it a '.PHONY' target instead. Otherwise you will encounter "No rule to make target" error. Next, we will need to 'eval' when extracting the assigning the parameters passed, otherwise the 'PARAMS' assignment will be executed as command.
.PHONY: action

    $(eval PARAMS := $(filter-out [email protected],$(MAKECMDGOALS)))
    @echo $(PARAMS)

Interestingly, there are four ways for variable assignment in Make. The 'Set If Absent' way of variable declaration and initialization is quite handly. Funny though, Perl, which is known for its brevity, does not have such language construct.
# Lazy Set. Value is expanded and set when used.

# Immediate Set. Value is set when declared.

# Set If Absent

# Append

Write it down, make it happens. Never underestimate the power of writing. Sometimes, the pen is mightier than the sword.

'git commit --allow-empty'. My goodness! I'm not aware of this option exists in Git. How many times I've adjusted a space just to create and make an empty dummy commit. While we on Git, if you seems to "misuse" it somehow, there are many ways to recover back.

Web development is a layer of layer of layer of abstraction hacks? I firmly believe. It's messy, plagues with multiple choices, and feels like wild wild west. HN user, meredydd mentioned that modern web application today consists of five programming languages and three frameworks. Interestingly, I never realize there are so many choices. Maybe future Javascript, ES2016 can reduce that paradox of choices by standardizing on using the same language for frontend and backend, as in isomorphic Javascript? But that also raises another interesting question. Is web development a constant rewrite of existing application to newer technologies?

This Week I Learned - 2016 Week 18

Write-up for last week or you might want to read the whole series.

Idea Debt. (HN thread) Break from your vicious cycle, do something, everyday, no matter how small is it. Build a habit.

One thing that really bother me when using LibreOffice is stability. The application tends to crash especially when editing large document. One of the way I resolve this is to break down the document into chapters or sections and then concatenate all the ODT files into one final file. The 'ooo_cat' program in OOoPy utility really helps. However, there are some quirks with the program, file merging still have some formatting issues and you have to manually adjust them.

Some may ask, why not using Markdown through Pandoc for writing? I've mentioned this last week, table creation using Markdown is still a lot to be desired. Furthermore, the document is a collaboration works with non-technical people, who only comfortable using MS Office. I can't blame them, in term of user experience, LibreOffice is still way, way behind.

DOE-STD-1029-92. Writer's Guide to Technical Procedures. Interesting document found while looking for guidance of how to write technical document. Context-wise, the target reader are those working under difficult and stressful condition, hence, the writing should be direct and specific to remove any ambiguous words which is subject to reader interpretation. Similarly, the recommendations in the standard can be applied to your own writing and coding as well. This is very useful if you want to write test cases as well.

Some good examples from the document are:

Avoid ambiguous words.
No: "the right valve"
Yes: "the right-hand valve" 

Avoid vague adjectives (words modifying nouns) and adverbs (words modifying verbs). Be specific, do not let user interpret.
No: "Drain the tank slowly."
Yes: "Drain the tank at 10 gallons/minute" 

Use spelled-out numbers, emphasis when needed.
No: "Energize 1 4.16 kV bus."
Yes: "Energize one 4.16 kV bus."

No: "Use 1 of the following."
Yes: "Use one of the following." 

No: "if the temp is 80EF ± 5EF..."
Yes: "if the temp is 75E to 85E F..."
Yes: "if the temp is 80E F (acceptable range of 75E to 85E)"

This Week I Learned - 2016 Week 10

Last week post.

#1 Borg, Omega, and Kubernetes. Lessons learned from three container-management systems over a decade. Surprised to discovered that the recently released Kubernetes is not the latest container-management systems used internally at Google. Three people (two being non-technical) have brought up Kubernetes for the past two months. So it seems, the container fad have finally caught up in the local IT scene here.

#2 Modifiers. Add variety to in writing your sentences. May not be that suitable for technical writing. Should be fun to experiment different types of modifiers (resumptive, summative, or free) in exploring Writing Prompts.

#3 Shintarō Midorima, better long range basketball shooter than Stephen Curry? Which reminds me of this article I've read on The Steph Curry Fallacy. You can't just be another Stephen Curry without having the supporting environment and people to "nurture" your talent.

#4 SSHTron. Multiplayer Tron in your terminal. Not sure how they did it but it was technical fun and interesting.

This Week I Learned - 2016 Week 02

In case you miss out, the last week post

#1 Code-Switching to Improve Your Writing and Productivity. A discussion of ways to prevent yourself from fixated or "over baking" on your work while writing or coding. The gist of the approach is the switching between different writing assignments regularly. Just write and keep the momentum going.

Note: I've just realized while writing this post, I was applying her approach where each item in this post is a different topic for me to explore, investigate, learn, and jot it down concurrently. I was jumping between the items.

#2 The Best American Essays. You can find the list of essays for the year 2015. As stated in #1, to improve your writing, you need to read, learn, and mimic from the best essayists.

#3 The Easy Way To Learn Hard Stuff. To master any skill (in the context of programming), build stuff and built it starting from day one! Don't be obsess with elements (syntax and semantics) of the programming languages, use these elements to build something. In other words, don't focus on the tools, use the tools for all its intended purposes. For more general disciplines, the Coursera's course on Learning How to Learn is a good place to start. Plenty list of researched learning techniques.

One such technique is read, recall, and write it down (HN dicusssion) or similarly PQRST method. There is a worries that rote learning may lead to mere memorization, but without the information inside your head in the first place, how can you think and connect all the dots? I like the application of this technique in programming. Basically learn enough fundamental and challenge yourself to build something up from scratch without any references until your're really stuck. I experience once before while picking up Nim programming language. I was stuck with just a documentation and without Internet access. So, you're pretty much have to learn the hard and slow way but definitely you'll learn fast. Why so? One good reason, without Internet, there is not distraction or excuses for your to procrastinate.

#4 Already few days into the new year. Still contemplating on your new year's resolution? The US government has a list of popular new year's resolutions. Moreover, for each resolution, there is plenty of resources to guide you. Give it a try! For programmer, there is always the resolutions for programmer (HN discussion) which I covered it last week.

#5 Remember Dark Patterns, the deceptive user interface patterns to trick people? Now we have something similar but the opposite. GoodUI, a site which list good user interface patterns which have been heavily A/B tested.

#6 Ansible 2.0 has been released (Thre is a good HN discussion on YAML vs. Bash script). I have been anticipate this release especially the package module which let us install software using underlying package manager. Unfortunately, this only works if the package name is the same through all the GNU/Linux distributions, which is not so for most of the time. Also block is a welcoming feature which help to group related tasks by distribution like using 'ansible_distribution'.

Write like a Motherf*cker

No. Is not another provocative post by Zed Shaw. Instead is a post by Jonathan Chen of his on-going project to write everyday for a year starting from Aug 1 2013 till Aug 1 2014.

Is nice to found someone who is doing a similar goal as yours. However, he is way more discipline and a better writer than me. Nevertheless, truly inspiring.

If you've noticed, I have been uttering horseshit (something I learned from Jonathan post) since 8PM yesterday. Why? Just clearing all the pending bookmarks on my Chrome toolbar. I am starting to realize writing has become a medium for me to jot down my discovery, monitor my progress, clarify my thought, and off course, vent my fsckstration. Surely a good daily habit to have and continue to do so as well.

Clarify Thoughts Through Writing

"Once you begin to find a mode of writing that strikes you as interesting, you can begin to almost go out looking for things to write ABOUT, and that leads to very very very interesting discoveries about people, yourself, your friends, human characteristics/ behaviors, and the world in general.
Writing can be a gateway to understanding the world better, and if done correctly, the world may understand you better."
-- naregian, fellow redditor, emphasis added
Also, a way to clarify your thoughts and express your self. Especially on conveying your thoughts or feelings in #writing . Still struggling with word choices due to my limited vocabulary. But the gap is gradually shorten (slowly but surely) since I started writing few months back.

Current approach is trying to develop a daily habit of writing of 100 words (which I still fail to do so). I am going for consistency in quantity and not quality. For writing style, use simple English with short sentences and a mentality of of writing to inform rather than to impress.

I am wondering, by next year, what will happen to me if I manage to make writing my daily habit?

George Saunders On Editing.

George Saunders on editing process. Interesting exaggerated example given.

1. Bob came happily to the room and sat down on the blue couch.
2. Bob came happily to the room and sat on the blue couch.
3. Bob sat on the blue couch.
4. Bob sat on the couch.
5. Bob.

Will try to buy his latest book, Tenth of December : Stories tomorrow at the KLCC book fair. Even though the review I read were quite mixed but I really love his short, simple, and minimalist writing style. Hopefully I can gain something from reading this book.

Writing Success

"He would usually rise every morning at 5.30 to get his writing done before he -went into the office. 'Three hours a day,' he declared, 'will produce as much as a man ought to write."-- About Anthony Trollope [1] Writing  Success
If you adhere strictly to a daily quota of of doing X, will you become more skillful in accomplishing X? The brute force strategy of getting better at something by going for quantity rather than quality. As they said, fail fast, fail early, and fail often. Where can you find the source of willpower and discipline to become prolific at X?

Write Every Day

"Write every day. When you write every day, it becomes a habit and you do it automatically. Habits are things you get for free."
-- Cory Doctorow on best received advice. Emphasis mine.

10,000 Words Per Day?

Unfortunately I can't even write anything more than 20 words daily. I need to doing more research to improve my knowledge and choose interesting topic to write to keep my enthusiasm going.