This Week I Learned - 2016 Week 29

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 28

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

Great rule when picking up any technologies for your development stack.
If a project is innovative in a business sense, then choose a boring technology. If it is boring in a business sense, then choose an interesting technology.

Newscombinator's best of bookmarks. Every links is worthy your precious time.

Caching your GitHub password in Git. Seriously, do this if you commit early and commit often to remote repository.

The Golden Age of Autodidacts. Don't be a passive learner but instead a self-directed learner. Knowledge workers like programmer should always improve their learning skills. Don't let the feeling of inadequacy stop you, incorporate purpose or meaning in your learning. Start analyzing your learn and work pattern. Adapt and adjust. It's always never too late to start anything.