This Week I Learned - 2016 Week 21

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

My time with Rails is up. This sure brings back the memory of Zed Shaw's infamous rant post, Rails is a Ghetto. I think the author major issue is Ruby on Rails tight coupling architecture. I can understand why he prefers building web application from a bunch of independent libraries (more like Unix's philosophy of 'Do One Thing and Do It Well' approach). This is Gartner's Hype Cycle at work here and this excellent reply provides another point of view and suggestions. What's next in Ruby land if you want to build a web application but not using Rails? Traiblazer, Hanami, ROM, and dry-rb. One good thing the came out from all the Rails hype was that more developers were made aware of PostgreSQL instead of the default MySQL.

How I Vim. Interviews of Vim's user on how they customized and use Vim. Due to the recent changes in life, I've been evaluating Sublime Text and have a different perspective and understanding on why this editor was popular among non-Unix users. There is nothing unique about Sublime Text that both Vim or Emacs can't reproduce. The only things missing in both these legacy editors is good sensible default. For examples, searching multiple files or jumping through definitions without resorting to external plugins and customization.

Remember that you always search for "asdfasdksfdasdf" just to clear the highlighted search results, even after restarting the Vim? There is a way, although still manual, to toggle off the highlighted search. This is coming from :best of Vim.
nnoremap  / :nohlsearch

Again, another unsolved Vim's customization cleared today! Auto-reload your '.vimrc' file upon saving.
augroup reload_vimrc
    autocmd!
    autocmd BufWritePost $MYVIMRC source $MYVIMRC
augroup END

The machine is acting up again and I can't get anything much done today. Most probably it has reaches its end of life. Maybe is time to get a new machine instead.

This Week I Learned - 2016 Week 20

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

Automate your daily computing life. I noticed that the only two application that are crucial for me in my daily computing usage is Gnome Terminal and Google Chrome. To prevent me from starting both applications manually on daily basis, why not start both applications when I log into Gnome?
  1. Press 'Alt + F2' and enter the command 'gnome-session-properties'
  2. Add a Startup Program
  3. Add name as 'Gnome Terminal'
  4. Add command as 'gnome-terminal --window --maximize'

Upgraded my almost four-plus years old D-link router. My Google-fu leads me to to TP Link's Archer C7 wireless dual band gigabit router. Features and values wise, this is probably the most suitable upgrade. Due to some absurd coincident, IPTV does not work by default, and TM gave me a replacement HyppTV Android Box IPTV set-top-box (Huawei EC6108V8). However, the issue remains and HyppTV still won't work. In the end, found the workaround which is to disable the Hardware NAT, which is only useful if your Internet connection is above 100MB/s.


Should I flash the device with OpenWrt? Nah, the default is good enough for now.

Updating classic workplace sabotage techniques. (HN discussion) After all this while, people still don't realize, the case against open-plan offices has been studied and it was suggested, terrible for employee. Someone joked that this is decade-long strategy by headphone companies to sell more "noise cancellation devices". To be fair, it depends on your personality, either you're introvert or extrovert, the office environment, and the people in the office.

Web application is "database skin". Another interesting metaphor in addition to what I always use, web application is a "glorified spreadsheet".

This Week I Learned - 2016 Week 19

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

Mithridatism, the practice of gradually building immunity towards poison through self-administering smaller and non-lethal dose. The first thing that came to my mind is the fictional sect  of Five Poisons Cult in the Wuxia, a genre of Chinese fiction focus on chivalry and martial arts in ancient China.

Surviving the Framework Hype Cycle. Crucial presentation for those working in web development. Either you go with the fad and endure the mid-life crisis. Which is coincident with what I learned last week regarding emerging technologies and how to interpret it through Gartner Hyper Cycle

Why are developers always chasing the latest shinny new things in the development world? Two reasons. First, the resume-driven development where we all wanted to use the latest, greatest, or sexiest technologies to build system regardless the suitability. Second, to join the league of 10x developer. Someone actually jokes that x represents the original estimation, which is true sometimes.

Bradon Hays' letter to an aspiring developer. In short, learn and work with smart people to level up your skill. But I do agree, regardless the experiences, it takes a developer around 6 to 12 months to be comfortable with any programming languages and frameworks. And most importantly, don't be those 10-plus years developer who have SAME year of experience, 10-plus times. Something interesting that he mentioned about masking "honesty" or "humility" as pessimism, contrary to what Dijkstra wrote in his Turing Award Lecture, The Humble Programmer.

New GNU Emacs website. (HN discussion) I think Free Software Foundation (FSF) finally realize the needs to have suitable way to promote free software and attract developers, especially Emacs. I suspect the release of Visual Studio Code might have something to do with it. For a start, why not  have a more sensible default configuration? FSF needs a good re-branding and marketing, not the philosophy but the brand itself. Maybe is time for me to help out with the development as well? But first, how much evil I need in Emacs?

Sticky keys. I was aware of it but didn't pay much attention but was reminded again. Interesting way to reduce the possibility of Repetitive Strain Injury (RSI).

Cure for Cron's cronic problem. I'm not sure why this feature was not added to the Cron itself? While the moreutils' chronic provides similar feature, Cronic have better error reporting as shown below.
From: user@example.net (Cron Daemon)
To: user@example.net
Subject: Cron  cronic backup

Cronic detected failure or error output for the command:
backup

RESULT CODE: 1

ERROR OUTPUT:
cp: data2: Permission denied

STANDARD OUTPUT:

TRACE-ERROR OUTPUT:
+ cp -rp data1 /backup
+ cp -rp data2 /backup
cp: data2: Permission denied

Someone sent me this good advice on finding happiness. I'm not sure who wrote this, but the advice seems thought provoking.
  1. Make a list of things that make you happy
  2. Make a list of things you do every day
  3. Compare the list
  4. Adjust accordingly

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 17

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

Busy week, didn't follow up with anything else. Nothing but reading and writing papers.

Being a developer after 40? (HN thread) Are you too old for development? Nope. While general consensus is that if you over 35, you should either be in the management, start your own company, or be a consultant. But why you want to move on to something else? There is still so much to learn. Have fun, rest well, and keep yourself healthy. The first post of the discussion may shed some lights on the actual reason why organization are reluctant to hire more experience (often correlate with age) developer.

Learn a new technology each week in 2016. Awesome weekly project! Unfortunately, most of the project are written in Scala. Not that I've something against the programming language, but I've painful and dreadful slow experience setting up both Scala and Play framework. The main culprit is sbt, the interactive build tool. The number of dependencies to be downloaded in order to get sbt to work is so painful huge is like you're downloading the whole Internet. Furthermore, you really need a powerful development machine to do any development work in Java-based platform.

Pandoc (the universal document converter) with Markdown is awesome. But no one still can solve the annoying problem of making it easy to create a simple table. 

Why isn't Perl more popular? Reasons? Perl is a glorified AWK. The TMTOWTDI motto. Osborne effect of Perl 6PHP, the simplified version of Perl took over the web and dethroned Perl. No killer apps (like Rails for Ruby or WordPress for PHP).