TWIL: June 21-28, 2017

Haproxy. What is it good for?
Open source load balancer. "Load balancing refers to efficiently distributing incoming network traffic across a group of backend servers, also known as a server farm or server pool." - Ngix.com
Further https://www.digitalocean.com/community/tutorials/an-introduction-to-haproxy-and-load-balancing-concepts

Lessons in Debugging
TIL: _.compact(array) removes all falsey values: null, 0, false, undefined, null.
Problem: Remove unnecessary punctuation from lists when entries are missing
Solution: Removed hardcoded punctuation from templates. Replaced with a helper. Lodash compact cleans a list of values, nice to use. A join(‘, ’) can then add a comma or any other type of separator like -, *, $.

TIL: Ember link-to helper a powerful replacement for a tags
Problem: Error messages were directing to admin page instead of homepage. Results were diff on local, staging & prod.
Solution: The issue was the code was using an html-a-tag and the right environment wasn't getting parsed. The Ember way is to always prefer the use of the link-to helper, and it takes care of such issues via magic.
Tip: Fastest way to find route names was to reference Ember debugger.

TIL: html pre tags can be used to easily style/format an unstructured object keeping a bunch of extra whitespace if that's what's wanted.
Further: https://www.sitepoint.com/everything-need-know-html-pre-element/

TIL: Good use case for .test() JavaScript function it to pattern-match against a regular expression. String functions in general work well with RegEx: replace(), test(), match()

Work Flow Enhancements:
Atom Editor: Git Ninja-ing. Cmd+Shift+P to see some nice git oriented core packages already there. One use case was to see git blame on a file which was useful in the GUI & editor, prefer on github.com. Still have to see whether the feature to write commits and push/pull from the editor will be used much.

Atom also has tabs. Was introduced to it by a work colleague. Mind blown. Use them if you have several instances of atom editor open. Multiple projects or inter-related ones can collapse together. Only trouble is that it doesn't seem to have any keyboard shortcuts for switching between tabs. Hacky way to solve is to download the Context app for switching, it's like Command+Tab on steroids.

Alfred: Paid for premium. The free version was pretty underwhelming. The upgrade feels like a terminal for your OS. The Copy clipboard feature is pretty nifty and should have been using one a long time ago.
Lot of great workflows & integrations: Advanced Google Maps, CanIUse, Dash, DevDocs, Slack, Emoji, Encode, Github, Slack, Kill Process, Network, Package Managers, Reddit, StackOverflow, iTerm2.