Showing posts with label self-help. Show all posts
Showing posts with label self-help. Show all posts

This Week I Learned - 2017 Week 17

Last week post or the whole series.

What happen to software developers who are still coding in their 40, 50, and 60?  What will happen in the next 22 years will be an interesting and unknown territory for older programmer to explore. There is always the case of how to do keep improving or how can we be a better programmerKaizen. Continuous improvement through through learning with understanding and stay healthy, both physically and mentally.

Complacency is your worse enemy when come to learning. We take it easy, do not dare to explore out of our comfort zone and afraid to look stupid. We know if we're heading this path, we will stuck forever, basically doing the same thing every year. Hence the developer with ten years experience but doing the same thing every year. Yet, we're afraid to start. Keep waiting for the right moment, the right motivation, and so no.

The older I get, the more I realized that motivation is fleeting and only discipline is reliable. Motivation is based on feeling where discipline is based on your habit. Best to cultivate good habits rather than waiting for the right feeling to come. Nothing but one step at a time.

#1 RIP Robert Pirsig. (via HN) Yes, he is the author of the cult book, Zen and the Art of of Motorcycle Maintenance. Interesting write-up on him during his day at spent in Banaras Hindu University (Varanasi, India).

#2 Good write-up on being a serious code reviewer. Only professional developer will take their code review session seriously as both parties, the reviewer and the code will learn something out of the session. The main obstacle is always how to handle it in a objective manner. Sometimes developer forget that you are (as a person) not your code. It's always a tricky situation.

#3 Sometimes, certain websites could change your life. No surprise some sites from are Ask Metafilter. All these reminds me of the web of the '90 and the time spent on aimlessly browsing through each pages. This is before RSS was even a thing yet.

#4 How many ways to execute your script parallelly? Three. Using wait, xargs, and GNU Parallel. The last one is the most comprehensive, featureful, and still being maintained.

#5 How Technology is Hijacking Your Mind. The prevalent tactics on manipulating our surfing behaviour. Throw in some dark patterns, we're basically somehow influenced to a certain agenda and direction. Given the ubiquitous Web and the Internet, how do we anticipate this manipulation? For a start, digital detox is a good start but still, this is not a long term solution, especially for those working in technology sector.

#6 Real-time Programming. (PDF) A course in learning about programming embedded real-time system.

#7 Is Perl still a good choice for web development? Yes and no. If you're not inheriting legacy Perl project, switch to something else more modern. If you're stuck with CGI, move to CGI alternatives like Mojolicious, Dancer2, Catalyst, or PSGI.

#8 Virtualization in GNU/Linux. Good introduction of different virtualization technologies available that we can use.

#9 The web is not desktop applications. Well said. Well said.

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 29

Looking back to the last week post or you might want to check out the whole series.

One of the issue when using Perl for beginner is to understand and differentiate the usage of referencing and dereferencing used by different data types, especially array or hash. Inspired by this site, the table below (generated by tablesgenerator) shows different way to initiate, reference, dereference, and accessing these data types.


$scalar @list %hash FILE
Instantiating it $scalar = "a"; @list = ("a", "b"); %list = ("a" => "b"); -
Instantiating a reference to it $ref = \"a"; $ref = ["a", "b"]; $ref = {"a" => "b"}; -
Referencing it $ref = \$scalar $ref = \@list $ref = \%list $ref = \*FILE
Dereferencing it $$ref or ${$ref} @{$ref} %{$ref} {$ref} or <$ref>
Accessing an element - ${$ref}[1] or $ref->[1] $ref{a} or $ref->{a} -

Git, the rebasing workflow. Better still, understand the how Git works and learn some Git branching, visually.
$ git fetch
$ git rebase origin/master
$ git checkout master
$ git merge insert_awesome_topical_branch_name_here
$ git push origen/master
$ git branch -d insert_awesome_topical_branch_name_here

Kimchi, web interface to KVM. Didn't realize this exists.

Good HN discussion on creating productive habits. Some of the interesting notes are:
  • Appreciate and be grateful with what you have and stop caring for things that make you unhappy.
  • Use a chess clock to remind you of the time you've spend on doing something else.
  • Set a expected time on how to do a task as works fill the time you've set to do it.
  • Meditation helps with focus.
  • Just get start, leave no excuses of not to start. You finish a task by starting.
  • Habit formation, though daily small steps (in other words, easy) until it's ingrained in you. Which is obtained through persistence and discipline. Remember habit > inspiration.
  • Complete something early in the morning. Something simple. Apply that mindset to your whole day. Also known as pre-game routine.
  • Eliminating the inessential. Minimized and focus on important things. Less is more.

Similar, another HN discussion on can't concentrate on tasks?

  • Low dopamine perhaps? Sleep and eat well. Take care of your mental healthiness as well.
  • Better dateline management.
  • Morning is the best time to work due to glucose level is high when you start your day.
  • You will need a deep work environment.

This Week I Learned - 2016 Week 09

Last week post.

#1 Goals vs. Systems. Before pursuing any goals, make sure you're making an informed and educated decision. The strategy is to use knowledge instead of willpower to pursuit your goals. For example, as not all carbohydrate foods are equal, you can lose weight easier if you pick the right food choice by knowing its Glycemic Index, which have an effect on a person's blood sugar.

#2 Raspberry Pi 3 is out. (HN discussion) The built-in onboard Wifi and Bluetooth as well as 64 bits support are welcoming feature. Unfortunately, local Element14 still awaiting stock. Heck, I can't even procure a Pi Zero till today. Not sure if the specs boost is worth the upgrade, however, some review claimed this release it's a worthy desktop replacement. If you never own a Pi before and itchy get on the single-board computer bandwagon, then you should get a Pi 3. As for me, will skip this as I'm saving money to get a SSD drive which definitely help with my testing of containers.

#3 Git rebase and the golden rule explained. Detailed explanation on Git rebase. If you want to stick to the Subversion's model of a single linear tree, then Git rebasing is the preferred choice. The only caveat is you may need to force-push if you rebase already commits that have been shared.

#4 Prevalence of Healthy Sleep Duration among Adults — United States. (Reddit discussion) Seriously, sleeping less than 7 hours per day may increase your chances of mortality. Rest people, rest.

#5 Using Make with Django. Lots of people (especially those from non-Unix background) overlook or underestimate the useful of GNU Make to manage tasks with your software project.

#6 How do you remember what you read? It will take times to internalised or digest the information but memorization is the initial step. If you can't retain the information within your brain, you can't analyze it. Retention is useful to verify your understanding if you just follow the these steps.
  1. Read a paragraph.
  2. Close the book.
  3. Write down what you remember.
  4. Re-read the paragraph and check.

This Week I Learned - 2016 Week 08

Last week post.

#1 NameError: name 'basestring' is not defined. Surprisingly there is still conflict with Ansible when installed using pip for Python 2 and Python 3.

#2 GNU/Linux Performance. Poster of tools you can use to investigate performance issues with your system.

#3 Container as Python module. (HN discussion) Interesting concept indeed. I've been looking at Docker for the past three weeks and this is probably best interesting use of container. It's useful when you want to build up an actual test environment from your Python apps or scripts. Instead of Mock object, you can test against the actual system, for example, an actual database system.

#4 Xamarin sold to Microsoft. (HN discussion). What took them so long? I read (can't remember where), it was sold for 400 millions. Interesting to see how this unfold in coming future.

#5 Non Zero Day. (HN discussion) Effective way to build a new habit through chain-method or streak. No, Jerry Seinfield did not create the Seinfield productivity program. For me, almost daily Git commit. You have to get started on something, the baby step..

This Week I Learned - 2016 Week 06

Previous post.

#1 PatternCraft. Learning Design Pattern through StarCraft. Never underestimate the importance of Software Metaphors in abstracting software engineering concepts.

#2 Ask HN: Best curated newsletters? Need a way to reduce your time from the net but at the same time still fear of missing out? Pick your favourite curated newsletters. Cron.weekly seems to have plenty of links which I've found interesting if you're looking into system administration. Mandarin Weekly caught my attention as well.

#3 How Git Merging turns you into a GITar Hero. Till today, I still don't understand why developers still fail to see the benefit of Git Rebasing. Maybe the complexity of the merged trees indicates productivity or sense of accomplishment? You know, software engineers tends to over-analyze and over-engineer.

#4 Linux Performance Analysis in 60,000 Milliseconds. Using uptime, dmesg, vmstat, mpstat, pidstat, iostat, free, sar, and top command, you can have an overview of the resource usage of a system. Don't want to go through the hassle of all these commands? Just use Glances, web or console-based monitoring tools written in Python. Perhaps, htop, an interactive process viewer or iotop, disk I/O status monitoring tool.

#5 Ping Sweep. Fun activity to do with nephews during CNY. We all learn how to find all available hosts that were connecting to the Access Point (AP). From the list of IP addresses, divide the these these hosts into mobile and computing devices. Have fun times scanning the network where they both overloaded the Wifi router by "nmapping" the network. The seed of learning have been planted, is really up to them to explore further. Hopefully, by the next CNY, they will move ahead even further and know which particular field in IT they want to venture into.

#6 Janice Kaplin: "The Gratitude Diaries". Is time to reflect and appreciate on what we have and where we are. How? Keep a gratitude journal.

#7 Today I Learned (TIL) is a famous subreddit. For technology related (programming or system administration), there are TIL collections created by Josh Branchaud, hashrocket, Jake Worth, and thoughtbot.

This Week I Learned - 2016 Week 03

In case you miss out, last week post.

#1 The Happiness Code. Using rationality to overcome bad mental habits. For programmer, is like identifying the bottleneck of a legacy system and then refactor and optimize it. In other words, hack yourself. I agree with one of the comment, seems like a rediscovery of Cognitive Behavioural Theraphy (CBT) to me.

#2 The Akrasia Effect: Why We Don’t Follow Through on What We Set Out to Do. (HN discussion) Struggle with self-control and making bad decisions against your best interests while knowing it? You're in Akrasia state. Procrastination is an exemplar of such self-denial mental state. There is a step-by-step visual guide on beating procrastination through identifying your motivation. I firmly believe that motivation is related to willpower as written by Roy Baumeister in his book, Willpower: Rediscovering the Greatest Human Strength. Strong willpower correlates with keeping yourself healthy though enough sleep, adequate exercise, and stress management.

#3 Upgrade to Ansible 2.0. Already encountered one showstopper bug, fixed but does not seems release out yet. Also, more explicit deprecation warning of using 'sudo' instead of 'become' as privilege escalation method. Lots of changes needed for my dotfiles using Ansible.

#4 Can't boot into graphical login by default through Systemd and Lightdm seems corrupted. It seems I've messed up my Ubuntu installation after I nuked the Gnome 3 and reverted back to Unity desktop. I'm too accustom to SysV init system and it going to take a while for me to get acquitted with Systemd. Need to remember the runlevels used as runlevel 1 (rescue.target), runlevel 3 (multi-user.target), and runlevel 5 (graphical.target).

#5 ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded. Weird behaviour when I downgrade from Maria 10.0 to MySQL 5.6, MySQL client login as root won't work. When come to reading multi-pages forum post, never try the first solution purposed. Always start reading from the last page and moving backward. It seems this was due to leftover configuration of MariaDB where authentication using UNIX socket is not enabled by default. Purged both MariaDB and MySQL and installed PerconaDB instead. However, even PerconaDB has its own rather idiotic issue with AppArmor.

#6 The sound of the dialup, pictured. Bring back all those nostalgia memory of connecting to the Internet using your dial-up modem. I still remember the agony and disappointment when the download failed at 99% and can't be resumed. So close yet so far.

#7 We all should get a FitBit or something equivalent. Our body always trying to tell us something but we tend to ignore it. Use this as a monitoring tool to 'listen'. It's alarming that the lack of quality sleep can have such damaging effects to our health and shorten our lifespan.

#8 What 20 years difference makes. With passion, fueled by persistency, and self-exploration and guidance, one can live up to his/her childhood dream. The 10 thousand hours rule at work here.

#9 Working with CSVs on the Command Line. Using common Unix utilities (cat, grep, awk, and the like) to manipulate CSV file. Similar post that describe the usage but grouped by intention. There is also more refine CSV processing console tools like csvtool, csvfiltercsvkit (the equivalent GUI version is OpenRefine), txt-sushi, and tabulator.

#10 Have a Panda's Series or DataFrame? You can sort both data structures either by index, using sort_index() or by values, using sort() or sort_values().

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