Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Friday, June 05, 2020

Why IntelliJ is better than VSCode

I've been trying to use VSCode as my main text editor for several months, for Python/Java/JavaScript. But there are important things that VSCode can't do that a dedicated IDE can do with ease. For example, I just got this Java exception when running my code in VSCode:

But will VSCode let me click the line to jump to the code? No it won't unfortunately. IntelliJ will. In fact, IntelliJ will even let me set a breakpoint in the code so I can stop and look around.

And I was really hoping that VSCode could serve my editor needs for any language.

Saturday, March 07, 2020

Favourite authors and influences

The following authors and people have had a big influence on my life.

  • Kent Beck
  • Dave Thomas
  • Marshall Rosenberg
  • Stephen Covey
  • Richard Bolles
  • Edward Feser
  • St. Joseph
  • Fr. Jacques Philippe
  • John Gottman
  • Gordon Neufeld
  • Jane Austen
  • St. Francis de Sales
  • Josef Pieper

Monday, February 10, 2020

Contexts vs Witch

I'm evaluating a couple of Mac task-switcher tools: Witch by ManyTricks and Contexts. I think I'm going to go with Contexts for the following reasons:

Advantages of Witch:

  • Can switch to a specific tab in Chrome and some other apps
Advantages of Contexts:
  • Faster than Witch. Sometimes Witch takes a few seconds to open for some reason.
  • Reliably binds to Command+Tab. When Witch is bound to Command+Tab, sometimes the old switcher opens on Command+Tab, for example, when the Google login screen is being shown. Contexts doesn't have this problem.

Sunday, January 19, 2020

My Holland Code

My Holland Code is CIA/CIR. This code is one way of summing up your interests.

My main ones are Conventional and Investigative. Conventional folks are people who like working with data and math and who are detail-oriented. Investigative people love to learn, analyze, and evaluate things. Yes I am detail-oriented and yes I like researching stuff (especially when shopping šŸ™‚).

My secondary ones are Artistic and Realistic. Artistic people like to use their creativity and have artistic abilities. Realistic people like to work with machines and tools. I have a bit of both although they aren't my primary strengths. I am a visual person and I like to show data visually. I also like to use my tools to do minor household repairs.

Great software engineers I love working with

This is a list of some good software engineers I have really enjoyed working with closely. I love how they code and the depth of their knowledge.

  • Andrey Sukhachev - Ning
  • Thomas Dudziak - Ning
  • Jon Hartlaub - Ning
  • Henning Schmiedehausen - Ning
  • David Sklar - Ning
  • Martin Traverso - Ning
  • Miguel Lara Encabo - AdRoll
  • Emmanuel Garcia - AdRoll
  • Piyush Srivastava - AdRoll
  • Kushagra Verma - AdRoll
  • Nathan Clegg - AdRoll/Ning
  • (to be continued)

Thursday, November 29, 2018

Meld: A good diff for OSX

Aside from the very expensive Araxis Merge, I think Meld is the best diff for OSX, at least for me, because:

  • It has the option to start with two blank textareas that you can paste text into.
  • It allows you to edit the textareas.
  • It gets the diff right almost all of the time.
  • It has optional line wrapping. Some other tools do not have this (such as Beyond Compare).
  • It can compare directories.
Check out this example of Sublimerge getting the diff wrong:
It fails to recognize that what is happening is that there were four removals. Meld gets it right:

Beyond Compare I just don't get. I know a lot of people praise it, but it seems buggy to me. For example, when I want to paste in the above example, I paste the code on the left:

And then to paste the code on the right, I click in the middle of the right textarea and press āŒ˜V, and now things are messed up:
So then I press āŒ˜A, āŒ˜V, thinking that will fix it, but it's still messed up:
Only when I press āŒ˜A, āŒ˜V on the left side are things finally fixed:
I don't know ā€“ there is something funny about the way Beyond Compare handles alignment. Like if the right side is blank, why is it letting me paste on different lines present on the left side, instead of pasting on the first line like a normal empty textarea?

I have also noticed that DeltaWalker gets diffs wrong too - I don't have an example at present, but will provide one when I can.

Friday, November 09, 2018

Slack: green z vs gray z

Today I learned the difference between the green z icon and the gray z icon in Slack:

From Slack support: "Green means they are currently online. The "z" indicates they have Do Not Disturb turned on which prevents notifications popping up on their screen."

Saturday, September 22, 2018

Comparison of Surrey BC municipal political parties

This is a comparison of the Surrey BC municipal political parties, drawn from articles in the Surrey Now-Leader newspaper.

LRT (Light Rail Transit) Municipal police force instead of RCMP
Surrey First Go ahead with LRT Hold a referendum
Safe Surrey Coalition SkyTrain instead of LRT Change to municipal police force
Surrey Integrity Now Go ahead with LRT for Guildford-to-Newton. More consultation for Phase 2. Weigh options first. Leaning toward keeping RCMP.
Proudly Surrey Go ahead with LRT + cross-border US bus network
Progressive Sustainable Surrey Interurban over LRT or SkyTrain
People First Surrey SkyTrain instead of LRT

Saturday, February 24, 2018

Comparison of smart water bottles

Hidrate Spark Thermos Smart Lid Ozmo H2OPal
Price 60 CAD 90 CAD 133 CAD
CamelCamelCamel reasonable price 60 CAD 90 CAD 133 CAD
Fakespot grade/adjusted rating F/ B/3 F A/3.5
Pros - alert: app, glow - rechargeable
- alert: app
- easy setup
- rechargeable
- alert: LED, vibration
- easy setup
- alert: app
Cons - paint peels off
- quality issues
- sync issues
- coin battery
- complex setup
- corny notifications
- quality issues
- sync issues
- skips sips
- quality issues
- sync issues
- don't need coffee detection
- quality issues
- coin battery
Other reviews PCMag PCMag

Thursday, February 08, 2018

Handy prioritization categories

I was googling for some tips on prioritizing home-improvement projects, when I came across a great list of prioritized categories for such projects. It occurred to me that the same list of categories could help to prioritize any to-do list, not just home maintenance:

  1. Safety
  2. Urgent damage
  3. Prevent long-term health hazards
  4. Maintenance / Prevent long-term damage
  5. Money-saving upgrades
  6. Low cost, high impact improvements
  7. Big nuisance factor
  8. Cosmetic improvements
Simply categorize your to-do list into the above categories, then work through them in approximately that order. 

See the original post for more details on each of those priorities.

Saturday, April 29, 2017

BC Provincial Election resources

Voters who are unsure of who to vote for should check out these two resources:

Saturday, April 01, 2017

Parachute Randomized Prioritizing Grid

This tool helps you to rank a list of your preferences by comparing them a pair at a time. The idea is based on Richard Bolles' Prioritizing Grid (as implemented by Beverly Ryle). But one think I don't like about it is that the pairs aren't randomized, which makes the exercise a bit more boring than it has to be. Also once you start getting as high as 30 items, the grid becomes hard to use (the online version scrolls off-screen on my laptop).

So this version presents random pairs to you. It still uses the same sorting scheme (by number of wins). I basically took my Elo Preference Ranker UI and modified/simplified it.

Simply paste in a list of items to rank, one per line (e.g., your favorite skills). Then press "Start ranking!". You will then be presented with a pair of items at a time, and you are asked to choose which is better or more important. As you go, the sorted list will appear at the bottom.

Input Strings

Enter the strings to rank, one per line. Then press "Start ranking!". You will be presented with pairs of strings - click the button corresponding to which item is more important or better.


Click the button corresponding to which item is more important or better. You can also press "J" for the left item and "L" for the right.

Something. Something else.

0 remaining

You have finished comparing all items!

Sorted Output Strings

The sorted strings are:

Saturday, March 11, 2017

Slides from "Prayer and Scripture" talk

I gave a half-hour talk on Prayer and Scripture for Couples For Christ, Our Lady of Good Counsel Parish, Surrey BC on March 11, 2017.

The slides are here (38 MB), but won't make sense without the accompanying talk.

Monday, January 30, 2017

Hacker News favourite categories

It can be instructive and fun to figure out what your interests are by looking at what kind of Hacker News articles you link.

I am going to tabulate my interests here - try the same if you like.

  • 2 - Work: How to make it better
  • 3 - Work: How to make it worse
  • 1 - Improvements to software engineering 
  • 13 - Promising new coding practices or tools
  • 4 - Product successes
  • 13 - Product failures
  • 3 - Promising new technology
  • 3 - Retro tech
  • 4 - Low tech
  • 4 - Personal self-improvement

Pressure-mounted baby gate comparison

After spending way too many hours on researching this topic, I have come to the conclusion that when looking for a pressure-mounted baby gate, you have the following options:

Price Example Comfortably wide door Latch is easy to open Gate auto-closes behind you
$40 Regalo Easy Step Walk Thru      
$60 Evenflo Easy Walk-Through Yes    
$80 Brica/Munchkin Wood & Steel Designer Yes Yes  
$100 Munchkin Auto Close Designer Yes Yes Yes

Thursday, December 29, 2016

An objective definition of beautiful software

Beautiful software is code that you can add features to while only needing to modify a few lines to allow the change to come in.

So the most beautiful software is code that requires 0 line changes before adding a feature.

But if it requires a handful of line changes, it's still beautiful to me.

Ugly software needs shotgun surgery when a feature needs to be added - changes in a bazillion places.

Tuesday, July 12, 2016

5-minute journal

I'm trying out a cool thing called the 5-Minute Journal. It is a journal that you buy for $25 CAD (there is also a $5 app, but I think I prefer pen and paper). Basically it is a guided journal that asks you the same set of questions each day (with some variations: inspirational quote, weekly challenge). I have always had trouble keeping a journal, but I think this will really help. 

Tuesday, June 07, 2016

Turning right on red is tricky

When driving, there are a lot of things you need to consider when turning right on a red light:

  • Is there a vehicle going straight?
  • Is there a vehicle turning left?
  • Is there a cyclist in your blind spot, or crossing either of the crosswalks?
  • Is there a pedestrian crossing either of the crosswalks from either side?
  • Is the light about to turn green? If yes, is there a pedestrian about to cross, or a cyclist in your blind spot?

It seems like a huge amount of factors to consider.


Friday, April 29, 2016

Please, please use a 3-way diff to resolve your git merge conflicts

I would like to stress the importance of using a 3-way diff to resolve merge conflicts. With a 3-way diff, you get:

                     Remote lines            Common ancestor lines            Local lines

It is very important to see the common ancestor, so that you can see exactly what changes were made to the remote file, and what changes were made to the local file. This gives you insight to see how you should combine the remote change with the local change.

I have made this 5-minute video to show you how to use a free 3-way diff called P4Merge (available for Windows and Mac) to resolve your conflicts:

To set up P4Merge with Git, just google for: p4merge git windows or p4merge git mac.

Wednesday, March 02, 2016

Use Google Sites to create a free website for a business

I used Google Sites to create free websites for a couple of businesses for my friends and family. First, my friend's electrical contractor business: Trivino Electrical Services. Second, my dad's tutorial center: Young Ones.

They have a bunch of average-looking templates that you can use to quickly create the website.

It's free, but if you want a custom domain, you need to pay $10-$20/year to Namecheap or another domain name registrar.

Monday, February 15, 2016

Catholic Lifetime Reading Plan (Sorted by Subject)

Here is Fr. John McCloskey's Catholic Lifetime Reading Plan, sorted by subject:

Catholicism Explained/Theology – Adams – The Spirit of Catholicism
Catholicism Explained/Theology – Bouyer – Spirit and Forms of Protestantism
Catholicism Explained/Theology – Catechism of the Catholic Church
Catholicism Explained/Theology – Hahn – Rome Sweet Home
Catholicism Explained/Theology – Kreeft – Christianity for Modern Pagans
Catholicism Explained/Theology – Newman – Essay on Development of Christian Doctrine
Catholicism Explained/Theology – Ott – Fundamentals of Catholic Dogma
Catholicism Explained/Theology – Pieper – The Four Cardinal Virtues
History and Culture – Belloc – How The Reformation Happened
History and Culture – Belloc – Survivals and New Arrivals
History and Culture – Belloc – The Great Heresies
History and Culture – Carroll – History of Christendom (All Volumes)
History and Culture – Crocker – Triumph
History and Culture – Dawson – Christianity and European Culture
History and Culture – Guardini – End of the Modern World
History and Culture – Hannam – God's Philosophers
History and Culture – Knox – Enthusiasm
History and Culture – Leclercq – Love of Learning and the Desire for God
History and Culture – Walsh – Our Lady of Fatima
Holy Men and Women – Chesterton – St. Francis of Assisi
Holy Men and Women – Day – Long Loneliness
Holy Men and Women – John XXIII – Journal of a Soul
Holy Men and Women – Merton – Seven Storey Mountain
Holy Men and Women – Muggeridge – Something Beautiful for God
Holy Men and Women – Newman – Apologia Pro Vita Sua
Holy Men and Women – Simon Peter – Chevrot
Holy Men and Women – St. Thomas Aquinas – Chesterton
Holy Men and Women – Suarez – Mary of Nazareth
Holy Men and Women – Trochu – Cure of Ars
Holy Men and Women – Wegemer – Thomas More
Holy Men and Women – Weigel – Witness to Hope
Literary Classics – Benson – Lord of the World
Literary Classics – Bernanos – The Diary of a Country Priest
Literary Classics – Cervantes – Don Quixote
Literary Classics – Dante – Divine Comedy
Literary Classics – Eliot – Christianity and Culture
Literary Classics – Endo – Silence
Literary Classics – Hopkins – Hopkins: Poetry and Prose
Literary Classics – Kristen Lavransdatter 1
Literary Classics – Kristen Lavransdatter 2
Literary Classics – Kristen Lavransdatter 3
Literary Classics – Newman – Idea of a University
Literary Classics – O'Connor – Flannery O'Connor: Complete Stories
Literary Classics – Percy – Lost in Cosmos
Literary Classics – Percy – Love in the Ruins
Literary Classics – Sienkiewicz – Quo Vadis
Literary Classics – Tolkien – Lord of Rings
Literary Classics – Waugh – Brideshead Revisited
Misc – Benedict XVI – Day by Day with the Pope
Misc – Benedict XVI – Opera Omnia
Misc – Bennet – The Emotions God Gave You
Misc – Bennet – The Temperament God Gave You
Misc – Enzler – My Other Self
Misc – John Paul II – Opera Omnia
Misc – Masson – Companion Guide to Rome
Misc – Neuhaus – Catholic Matters
Misc – Rice – 50 Questions on the Natural Law
Misc – Sertillanges – Intellectual Life
Misc – Stein – Woman
Misc – The Privilege of Being a Woman – Hildebrand
Spiritual Classics – Augustine – City of God
Spiritual Classics – Augustine – Confessions of St. Augustine
Spiritual Classics – Chesterton – Everlasting Man
Spiritual Classics – Chesterton – Orthodoxy
Spiritual Classics – John of the Cross – Dark Night of the Soul
Spiritual Classics – King's Good Servant but God's First – Monti
Spiritual Classics – Lewis – Mere Christianity
Spiritual Classics – Lewis – Problem with Pain
Spiritual Classics – Lewis – Screwtape Letters
Spiritual Classics – Mother Teresa – Meditations from a Simple Path
Spiritual Classics – Oursler – The Greatest Story Ever Told
Spiritual Classics – St. Catherine – Little Talks with God (modernized version of "The Dialogues")
Spiritual Classics – St. Teresa of Avila – Interior Castle
Spiritual Classics – St. Therese of Lisieux – Story of a Soul
Spiritual Classics – St. Thomas Aquinas – My Way of Life
Spiritual Classics – Teresa of Avila-Way of Perfection
Spiritual Classics – The Lord – Guardini
Spiritual Classics – Transformation – Hildebrand
Spiritual Reading – Aumann – Spiritual Theology
Spiritual Reading – Baur – Frequent Confession
Spiritual Reading – Baur – In Silence with God
Spiritual Reading – Boylan – Difficulties in Mental Prayer
Spiritual Reading – Boylan – Tremendous Lover
Spiritual Reading – Burke – Covenanted Happiness
Spiritual Reading – Caussaude – Abandonment to Divine Providence
Spiritual Reading – Chautard – Soul of Apostolate
Spiritual Reading – Cizek – He Leadeth Me
Spiritual Reading – d'Elbee – I Believe in Love
Spiritual Reading – de la Palma – The Sacred Passion
Spiritual Reading – de Sales – Introduction to Devout Life
Spiritual Reading – de Sales – Treatise on the Love of God
Spiritual Reading – Escriva – Christ is Passing By
Spiritual Reading – Escriva – Way of the Cross
Spiritual Reading – Escriva – Way, Furrow, Forge
Spiritual Reading – Faber – All for Jesus
Spiritual Reading – Garrigou-Lagrange – Three Ages of Interior Life, I
Spiritual Reading – Garrigou-Lagrange – Three Ages of Interior Life, II
Spiritual Reading – Granada – Sinner's Guide
Spiritual Reading – Holzner – Paul of Tarsus
Spiritual Reading – Kelly – Rediscovering Catholicism
Spiritual Reading – Kempis – The Imitation of Christ
Spiritual Reading – Liguori – 12 Steps to Holiness and Salvation
Spiritual Reading – Liguori – The Practice of the Love of God
Spiritual Reading – Liguori – Uniformity with God's Will
Spiritual Reading – Lovasik – The Hidden Power of Kindness
Spiritual Reading – Manzoni – Betrothed
Spiritual Reading – Martinez – True Devotion to the Holy Spirit
Spiritual Reading – Montfort – True Devotion
Spiritual Reading – More – Sadness of Christ
Spiritual Reading – Opera Omnia – (Jacques?) Phillipe
Spiritual Reading – Perquin – Abba Father
Spiritual Reading – Plus – Winning Souls for Christ
Spiritual Reading – Rohrbach – Conversation with Christ
Spiritual Reading – Scupoli – Spiritual Combat
Spiritual Reading – Sheed – Theology for Beginners
Spiritual Reading – Sheed – To Know Christ Jesus
Spiritual Reading – Sheen – Life of Christ
Spiritual Reading – Sheen – Three to Get Married
Spiritual Reading – Tanqueray – Spiritual Life
Spiritual Reading – The Divine Pity – Vann
Spiritual Reading – The Rule of Our Warfare – Newman

Thursday, January 28, 2016

Code smell: Schizophrenic method

A schizophrenic method is a method that is begging to be split into two. It has a lot of if statements, but closer inspection reveals that most of the ifs can be eliminated by splitting the method into two. It may take some effort to unravel the two cases from the hodgepodge of ifs on various variables, but it's beautiful if you can do it.

Saturday, January 23, 2016

Powerpoint for Rejoice and Pray: 2016 Couples For Christ theme song

It has some notes to help people grasp the melody quickly:


Thursday, January 21, 2016

Super8=>DVD Price Comparison, Surrey BC area

Here is a comparison of prices for Super8=>DVD conversion, in the Surrey BC Canada area.

Sunday, January 03, 2016

Dental Pitch: A Way to Obtain Perfect Pitch Using Your Teeth

Here is how to simulate perfect pitch using your teeth:

  • Tap your teeth together. You should hear the same pitch every time you tap your teeth together.
  • Go to a piano and find what note corresponds to the pitch coming from your teeth. For example, my teeth give me a Db.
  • Hum your way up (or down) from that note to C.

Now you have a way to hum a C without aid of any instrument, tuning fork, or app. Just your teeth.

Tuesday, December 01, 2015

Liking MYN better than GTD

I'm really liking MYN better than GTD. Instead of having a bunch of context lists, now I have one short list based on urgency (yes, urgency, or "start dates"; the book explains why). The list is short because stuff to do/review in the future is hidden.
Here's what my list looks like:

First, it's remarkable how short it is, compared to my huge GTD lists.
"High" is things that must absolutely be done today, even if I have to stay up late.
"Medium" is things to consider doing in the next couple of weeks. Some of them are recurring (every 3 days, every 4 months, etc.). The starred ones should preferably be done today, although they don't have to be.
"Low" is things that are "over the horizon" that I should at least review each week.
Also note what is not shown: the 136 hidden tasks. They are not shown because they have start dates in the future. Those are 136 tasks that I don't need to include in my weekly review, unlike in GTD. I really appreciate that.

Tuesday, November 10, 2015

Good simple free web-based mind-mapping tool

MindMup (Wikipedia). Even has a free iOS app to go with it.

Saturday, November 07, 2015


I'm trying out a new task management system called MYN ("Mind Your Now"). I have ported all of my GTD tasks into MYN. It seems to be quite good:

  • The best thing is that lists are kept small because you can hide items for a given number of days/weeks/years. You choose the next time that the item should pop in for review. So the weekly review becomes very quick.
  • Another good thing is that the system gives you good suggestions for what to do next: your list is sorted, so the stuff you need to focus on appears at the top. It is sorted first by urgency (counterintuitively) (with 3 classes of urgency), and then by start date (not due date) (so newer tasks appear first). I have always wanted a system that could suggest to me what to do next.

There is a free e-book called The One Minute To-Do List that has the MYN  system (with implementation using Toodledo) in its closing chapters. I liked it so much that I bought one of Michael Linenberger's books to get advanced details on the system.

Friday, November 06, 2015

Code Reviews in Iambic Pentameter

A few months ago, I tried doing an experiment: Writing my code reviews in iambic pentameter. When you write in iambic pentameter, you can't write nasty things—and if you tried, it would come off as humorous.

In the end, I stopped doing it though because people weren't responding to my reviews.

Anyway, preserved for posterity are the following 42 actual code reviews in iambic pentameter.

1. A 404 is when the story's gone.
But if the problem's that you're not allowed
To see it, then you want a 403.
ForbiddenException, that it should be.

2. To make SOLR respect a private field,
getBooleanSearchFields helps you to be healed.
Mode videos, without this, were all concealed.

Oh, but I see the same thing you did wield.

3. isPrivatePublic makes but little sense;
isPrivacyEnabled has defense.

4. You speak after you sleep, but if announce
That you will sleep, t'were best announced before.

5. IDs are not sequential - oft they jump
From high to low, then high again, then low,
createdDate were better for this flow.

6. Wherefore psw? I think you password mean,
Abbreviating's tasty as benzene.

7. .ban-top-center-cta as a class
Refers to "top" and "center" which are not
Semantic - no they're presentational.
Would that you chose .ban-publish-add-image
Then there'd be no semantical scrimmage.

8. Sort by createdDate, but you should know
ID does not increase in the same way.

> select from_unixtime(_created_date/1000), _id from _collection
    -> order by _created_date asc
    -> limit 10;
| from_unixtime(_created_date/1000) | _id   |
| 2012-11-08 20:17:29.4910          | 17499 |
| 2012-11-09 01:07:31.3610          | 17610 |
| 2012-11-09 01:09:04.3650          | 17618 |
| 2012-11-09 01:18:07.1550          | 17637 |
| 2012-11-09 01:18:57.7690          | 17556 | <- Jumps down
| 2012-11-09 20:06:21.7750          | 17574 |
| 2012-11-09 20:08:05.8680          | 17579 |
| 2012-11-09 20:08:54.1530          | 17654 | <- Jumps up
| 2012-11-09 20:33:14.9920          | 17593 | <- Jumps down
| 2012-11-10 00:24:31.0810          | 17695 | <- Jumps up
10 rows in set (0.15 sec)

beginFrom should be *date*, I'd recommend,
else you'll have to account for some loose ends.

9. This use of :not is not the greatest thing.
Can we step back and think what's going on?
.l-cnt-topad - is that content or not?
If no, .l-content should from it be gone.
If yes, .next-bg needs another class,
Perhaps .l-next-bg-content would pass.

10. Instead of papering o'er the problem here
It would be best to ask, what's the root cause?
allOptions.smarty's $defaultMsgKey
On line 282's not specified.
If you put there the $defaultMsgKey 
Then this line will not be needed by thee.

11. You added $defaultMsgKey right here
Beside $newMsgKey, like man and wife.
But in collect.js, I'm 'fraid to say
$newMsgKey, without her partner, lay.
Two places in collect.js she stands
Alone, and quite rejected by her man.

If $defaultMsgKey were put beside,
She and YOKO-6863 be bride.

12. For keeping it top level, I you thank.
The more we do, it's money in the bank.

And these module prefixes are real swank.

13.                             These strings
Should be in en_US's list of things.

14. For every other field, it ends with "-field",
Why was the suffix from this field repealed?
I'd recommend you change to "site-url-field".

15. How this did ever work, I do not know.
The initImagePicker function calls
To processImages, which I'm sure sets
this.images. Unlike the comment says,
We can have images and videos both
Which you can see if you do bookmark this:

16. I thought the powers at be did think it best
To put all z-indexes in _defs.less.

17. I wish we did not have to nest so deep,
Nest here, nest there, it multiplies like sheep.

18. No value for the href? Please explain
Why you thought href="" worthy to disdain.

19. The only thing that the jira required
Is “return path.replace(/.*\/\/[^/]*(.*)\?.*/, '$1')”. Or am I tired?
That regex will return the stuff that's parked
Between the domain and the question mark.

20. After a year, the meaning of "SB"
Will be but a forgotten memory.
Could you rename: collectStoryBuilder?
Then it will surely never bewilder.

21. Why nest these classes in l-bookmarklet?
l-bmk prefix does not suffice?
Removing all this nesting would be nice.

22. You import a big file into a small,
Why not just make this file contain it all?
It would be turning Saul into St. Paul.

23. In recent conversation we agreed
That underscore CSS class names suck.
Please use a hyphen; underscores, please chuck.

24. The top of this file says the prefix is
ems-. But you put ath- here.
Should you not use ems- to cohere?

25.                               I do not understand
Why this has to be so deeply nested.
If it were not nested, would it not work?
If we stopped nesting, it would be a perk.

26. "$googleAnalyticsSecondaryId"
Don't match "googleAnalyticsSecondary"
I would make them same for consistency.

27. This is not the "number of stories viewed",
It is the "IDs of the stories viewed".
I think this comment needs to be renewed.

28. Uma, why did you add _.storyChainedCount,
When we already have _.shownStoryCount?
    Are they not the same?
    Just a different name?
I'd recommend that you remove your count.

29. I'm sorry, but I don't quite understand.
Isn't the status 'active' or 'optout'?
How does the new code differ from the old?

30. If I do showOnBoarding($user, true),
Then showOnBoarding($user) should be true
But it is false. Is not this a boo-boo?

31. A boolean var name begins with "is"
But this is string and not a boolean.
Please rename this to $downloadBtnClass,
And then this name will be as clear as glass.

32. There is no need to strtolower this,
storeLink() already does it, like a kiss.

33. These offsets will be messed up either when
- pruneWaterfallBoxes kills earlier stuff
- reverse infinite scroll adds earlier stuff

How you will deal with these things will be tough.

34. <span class='ban-help-text'> should be changed to be
<span {FEATURED_LINK_ATTRS}>, right?, to agree.

35. newOffsetIndex is indeed array,
So it should be "newOffsetIndexes".
_.offsetIndex too is a list of things;
"_.offsetIndexes" would have better wings.

36. selector ain't a string - it's jQuery
If you rename to "$node" it would be good,
To make it clearer what's under the hood.

37. The activeKeys are keys, so why not make
Them actually keys in _.itemsList? I ache
To see _.getActiveElements looping
Through all the items. No! If they are keys,
activeElements = _.itemsList[activeKeys[i]].
O(n^2) becomes O(n). Gods are pleased.

38. I recommend that you make unit tests
For RedisImitatorService please.
It's easy to make bad bugs when you sneeze.

39. This kind of thing leads to XS attacks.
Could you encode title using this way?
You'll make malicious users cry, "Mayday!"

40. This no longer inits imagePicker;
I'd rename: "getDocumentImages",
The wrong meaning then won't be contagious.

41. I do not grok this logic; woe is me.
.bnd-cvr-featured-author, if parent,
Causes the buttons to be hidden. Why?
Connection I don't see, and so I sigh.

42. I do not know why this is called $events.
It's just the current target, is that right?
So wouldn't $currentTarget be more tight?

Thursday, August 06, 2015

The kind of work I like to do

While talking with my wife, I gained a big insight into the kind of work I like to do.

The greater this fraction, the more I will like the work:



        Time Spent

The greater the importance (e.g., to the company, or to me), the more I like it. The quicker I can do it, the more I like it. But if the project isn't very important, I won't really like it. Or if it takes a lot of time, I won't like it.

This is why I really enjoyed building Yubnub (high importance to me, only 24 hours spent). Conversely, I hate debugging intermittent production issues (the bug isn't really important to the company, and it takes days or weeks to figure out).