Subscribe: Jon Aquino's Mental Garden
http://feeds.feedburner.com/JonAquino
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
ago  aquino  book  bug  days ago  days  god  good  ideas  jonathan aquino  list  love  make  page  question  things  time  today 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Jon Aquino's Mental Garden

Jon Aquino's Mental Garden



Engineering beautiful software



Last Build Date: Thu, 14 Sep 2017 03:38:36 PDT

 



Git command to show you the largest commits you did in the past week

Mon, 29 Sep 2014 12:28:00 PDT

At Ning, we have a weekly meeting where we give feedback to the team based on how the week went. However, it's hard for me to remember the most important things I did in the past week.

The following git command will help. It gives you the commits from the past week sorted by number of lines:
git fetch; git log --author=Aquino --shortstat --pretty=format:'%C(yellow)%h %C(blue)%ad (%ar) %C(green)%cn %C(reset)%s' --date=short --since='1 week ago' "--remotes=*" -C | perl -ple 's/.*, (\d+ insertion).*/\1/' | perl -0 -ple 's/(.*\d\d\d\d-\d\d-\d\d.*)\n(\d+) insertion*/\2 \1/g' | sort -nr | less
(Make sure to replace Aquino with your name.)

It produces output like this:
90 0d9214a 2014-09-26 (3 days ago) Jonathan Aquino ABC-487: Extract uploading code into AbcUpload class.
68 0978007 2014-09-25 (4 days ago) Jonathan Aquino [no-jira] Remove hardcoded numbers...
54 d28dc90 2014-09-23 (6 days ago) Jonathan Aquino ABC-330: Make cropping actually work.
52 94afa2f 2014-09-24 (5 days ago) Jonathan Aquino [no-jira] Show full text of post in the detail view.
47 77e4710 2014-09-25 (4 days ago) Jonathan Aquino ABC-487: Extracted controller function into AbcCamera...




Final causes

Fri, 01 Aug 2014 08:40:18 PDT

I'm interested in understanding more about final causes, after reading Edward Feser's blog post, The Return of Final Causality, and the paper it links to, Does Efficient Causation Presuppose Final Causation.

What is a final cause? From what I understand, Aristotle said that every change requires four things (four "causes"):

  • efficient (the doer of the change)
  • material (what the changing thing is made of)
  • formal (the nature of the changing thing, common to all things of that type)
  • final (the normal result of doing what the doer is doing)
For some reason, most contemporary philosophers reject #3 and #4. I'm not sure why.

The basic idea of a final cause is given by the last sentence of the paper:
It is not empty to assert that all efficient causes are aimed at something.
Sometimes when you do something, the result is different than normal. Regarding this, the paper quotes Aquinas:
...in inanimate beings, the contingency of causes arises from imperfection and deficiency: because by their nature they are determined to one effect, which they always produce, unless there be an impediment due either to weakness of power, or some extrinsic agency, or indisposition of matter. For this reason natural causes are not indifferent to one or other result, but more often produce their effect in the same way, and seldom fail.
 I am going to re-read Feser's book The Last Superstition. Some questions I will have in mind while reading it are:

  1. I would like to understand Aristotle's ideas better (act and potency, form and matter, the four causes.)
  2. What reasons have we to believe that these ideas are true?
  3. Which of Aristotle's ideas do moderns reject and why?
  4. What problems does the rejection of these ideas cause?


Media Files:
http://philosophy.ucr.edu/wp-content/uploads/2013/07/Does-Efficient-Causation-Presuppose-Final-Causation.pdf




The Facebook Like Bug

Sat, 05 Aug 2017 23:02:24 PDT

I'll be honest - there are certain kinds of debugging that stress me out - such as when the bug is intermittent. One example is a bug that I've been looking at for the past day and a half: for quite a while, our users have been finding that Facebook Like buttons aren't working on their sites. They click Like and the popup appears for a second before disappearing. And it doesn't happen all of the time.

Well, we finally carved out some time this week to take a look at the issue. And yes, I could reproduce it yesterday. So I did my tried and true method of "deconstruction", in which I keep taking things away from the page until the problem stops. Well, I whittled the page down to just the Facebook Like snippet and it was still happening. So it was something to do with the URL we were giving to the Like button.

And then I couldn't reproduce it anymore.

Anyway, I was able to reproduce it again today. I put a bunch of Like buttons on a page: some that worked, some that didn't. And I eventually got it so that the only difference was that the Like buttons that didn't work had URLs that redirected to another URL.

By the way, throughout this saga, I was trawling the Facebook Bug Database and Stack Overflow for a silver bullet - someone who fixed the problem and here are the steps. I couldn't find any silver bullet, but it was still valuable because I heard mention of the Facebook Debugger, which sometimes fixes things when you put a URL through it because it clears Facebook's cache.

I tried putting my URL into Facebook's Debugger but it didn't fix my Like button. But I took a second look at the debugger results, and 'lo, there were some warnings about missing OpenGraph tags. I browsed around a bit and found that three of those tags are required (og:type, og:url, and og:title). So I put those tags on my page and...

yes...

the problem was fixed! Yay!




What's on your dock?

Sat, 05 Aug 2017 23:00:48 PDT

Tell me what's on your Mac OSX dock. These are the apps that you value the most.

Here's what's on my dock right now:

  • Finder
  • PostBox
  • Calendar
  • Adium
  • Notational Velocity
  • jEdit
  • iTerm2
  • Safari
  • Firefox
  • 1Password
  • Network Connect
  • Colors
  • Clock Chimes
  • iTunes
  • App Store
  • System Preferences
  • Microsoft Excel



Useful Git tool: tig

Sat, 05 Aug 2017 23:01:33 PDT

Here's a great article describing a useful Git tool called tig.

One thing it doesn't mention is that you can actually press comma (,) when doing a tig blame, to do a blame on the parent commit. This is useful if the blame on the current commit isn't showing who really changed the line. You can do blame on the line all the way up the parent tree.

Other tig tips:

  • Use this to browse the tree of another branch: tig origin/rel-1.5.
  • If while browsing the commits on another branch you press Shift+C on a commit, it will cherry-pick it into your current branch.



Ideas for what to write in cards

Sat, 05 Aug 2017 22:57:59 PDT

Here's a great list of ideas for what to write in a card, if you're stuck for ideas. From Hallmark.




Japanese method of folding t-shirts

Sat, 05 Aug 2017 22:56:43 PDT

I use this.

width="420" height="315" src="https://www.youtube.com/embed/b5AWQ5aBjgE" frameborder="0" allowfullscreen="">




Moving away from Google products: an experiment

Sat, 05 Aug 2017 22:56:00 PDT

I'm doing an experiment to see how well I can live without Google products. They have served me so well for so long, but I don't want to depend on them too much. So I have made the following moves:

  • Google search => Duck Duck Go
  • Gmail => Hotmail
  • Blogger => Ning
  • Chrome => Safari

So far, it has been OK!




Design email newsletter for programmers

Sat, 05 Aug 2017 22:55:22 PDT

Here's a great weekly email newsletter about design for programmers: Hack Design.

I was reading one of the newsletter articles today, called Making the Transition from Development to Design. It had some good quotes, such as these ones:

I think the future designer is going to look and act a lot more like a design technologist.

Avoid pixel-pushing at all costs – your job is to solve problems.

Our ideas should be bigger than reality, but our execution should be married to it.




Today's bug hunt

Sat, 05 Aug 2017 22:54:49 PDT

Today I worked on finding and fixing a bug that is difficult to reproduce. In fact, I couldn't reproduce it. So I had to look at the code and reason where the bug could possibly be located. From the error message in the bug report, I narrowed it down to a particular JavaScript file. And it sort of looked impossible that the bug could ever occur. Basically, the error message said that a variable was undefined, but we were clearly defining the variable before we were using it.

Or were we? It turns out that one of the places that used the variable was in a public method. So after thinking about it for a bit, it dawned on me that this method could be called before the object finished getting fully initialized. To prevent this, we always make sure to put all JavaScript that must run on page load in an "addOnRequire" callback. Anyway, the team that wrote this code doesn't work on this product much so they didn't do that.

So I thought about emailing the team to make them aware that they should use addOnRequire(). But then, they are not currently working on the product, and might not be for weeks or months, so how would they remember? So then I thought, I'll write a test that scans the JavaScript files to catch this pattern. Since our tests run frequently, we'll catch this problem any time it arises in the future. Cool!




An unobtrusive break reminder, for Mac

Sat, 05 Aug 2017 22:54:11 PDT

I was having trouble finding something to remind me to take an exercise break every hour or two. A lot of the break timers out there dim the screen and force you to press a button if you want to postpone it. This is problematic for programmers like me - you get into the "flow", and interruptions like that break your concentration, which is Not Good.

It turns out that it's not terribly hard to create your own (unobtrusive) break timer. Here's one that simply shows a Growl notification and makes a sound every hour, on a Mac with growlnotify installed:

breaktimer.sh

#!/bin/bash

while true

do

growlnotify -m "Take a break"

afplay /System/Library/Sounds/Blow.aiff

sleep 3600

done





On the importance of leisure

Sat, 05 Aug 2017 22:51:45 PDT

Likewise, your question refers to the classical notion of leisure, to the question, as I like to ask it: “What do we ‘do’ when all else is done?” As Pieper pointed out in his famous book, the Greek word for leisure, skole, is the origin of our word for school. The denial of leisure becomes the classical word for “business,” both in Greek and Latin. Thus, the time we devote to keeping alive, to making a living, while necessary and important, is not primarily time “for its own sake.” This latter time is the time beyond business. It is in this latter time that we should be “free” to think of the highest things. Not to have such time is to be a kind of slave to this world.

From an Interview with Fr. James V. Schall, S. J.




Soy Sauce Puzzle

Sat, 05 Aug 2017 22:50:59 PDT

So this is something that happened to me a few days ago, and it makes for a nice puzzle.

My wife asked me to pour soy sauce and vinegar into two saucers, equal parts (1:1 ratio).

I poured the vinegar into each saucer. But then I poured twice as much soy sauce as was needed into the first saucer.

Question: How do you fix this easily?

My wife solved it without thinking.




Growly Notes - like OneNote but for Mac

Wed, 06 Feb 2013 13:13:26 PST

I'm trying out a free Mac app called Growly Notes. I need a kind of "space" in which to record ideas, and I need it to be organized so I can find it again quickly later. This app may fit the bill. It has a bit of a following. And it's colorful, which is nice.

Also see the Lifehacker review.



Pine cones open up when you bring them inside

Fri, 23 Nov 2012 07:56:16 PST

My fiancee has been collecting pine cones for room decorations, and one cool thing we discovered is that they open up after you bring them inside. I'm not sure if it's caused by the warmth or the dryness or something else.

A day or two after you bring them in, you'll see that they gradually splay open. Evidently they are doing this to expose the seeds inside.



Two life-changing questions to ask yourself each day

Sat, 06 Oct 2012 09:00:24 PDT

There is a traditional practice of asking oneself the following two questions at the end of each day. It also works great with other people – my fiancée and I enjoy asking each other:.

1. What are you most grateful for today?
2. What are you least grateful for today?

There are other ways to ask them as well: What increased/drained your energy today? What brought you consolation/desolation today? What part of today did you really like/dislike?

The idea is that by reviewing your day and looking for what brought you life vs. what drained your energy, over time you will see patterns in the things that give you joy, and the things that don't. And you can make decisions that lead you to more of the former and less of the latter.

I read a recommendation for this book which talks more about it.



Favorite drink: Milkshake

Thu, 09 Aug 2012 16:05:20 PDT

Man, I just love milkshakes. I don't like pop or coffee that much, but it's nice to have a good, thick milkshake. I am enjoying one made out of cookies-and-cream ice cream right now. Better than a Frappucino or a Blizzard.

I was watching how they make a milkshake, and it seems that (at least at Just Desserts at SFO Airport) all they do is stick ice cream in a blender. Good 'nuff.





A better way to brush your teeth

Wed, 30 May 2012 08:16:19 PDT

Yesterday Mila informed me that various people have pioneered improved ways to brush one's teeth. One of the ways is the Bass Method. Basically, you point the brush into your gums at a 45 degree angle and jiggle the brush. See description (scroll down to "Modified Bass brushing technique") and video.



Make your own mini Moleskine notebook for (almost) free

Mon, 21 May 2012 20:04:12 PDT

Moleskine makes these nice mini notebooks that are so small you can slip them into your wallet. But they cost $10 for two. Here I'm going to show you how to make something pretty similar using materials you probably already have at home. All you need are:

  • a 3x5" writing pad
  • a 3x5" index card
  • a stapler
First grab a bunch of paper from your writing pad, and put it on top of the index card:


Next, fold everything in half:


Add a couple of staples along the fold:


And voila, you have a mini Moleskine-like notebook that you can stick in your jacket or wallet. I like to write the date in front – since these cost essentially 0 cents to make, I end up making a lot of them over the course of a year. Enjoy!





New todo-list system: One-Minute Todo List

Sat, 19 May 2012 22:08:44 PDT

I was trying a todo-list system called SuperFocus, in which you keep your todos in a notebook, and you must do at least one item on each page before moving on to look at the items on the next page.

But I got frustrated with it because tonight I had 10 minutes to do something from my lists, and I had a ton of important stuff in the last few pages. But because I have to do at least one item on a page before moving to the next page, I was stuck a few pages back on: polish shoes.

That tells me that there is something wrong with this system.

So I'm trying yet another todo-list system. This one is called the One-Minute Todo List. Here is a link to the free e-book PDF. The basic idea is to have three lists:

  • Critical Now (stuff that must be done today). Max 5 items. 
  • Opportunity Now (stuff to do within the next 10 days, when you get an opportunity). Max 20 items. Review daily.
  • Over-The-Horizon (stuff that could be done after 10 days). Unlimited items. Review weekly.
The third, unlimited list scares me a bit - it could get really huge. Anyway, we'll see how it goes.

One of the advantages of trying out a new to-do list system is that you can start with an empty list :-)


Media Files:
http://www.michaellinenberger.com/TheOneMinuteTo-DoList-Ebook.pdf




Spotted license plate 000 NPE

Fri, 18 May 2012 11:02:09 PDT

The significance of this odd spotting will probably only make sense to computer programmers (NPE = Null Pointer Exception), but a few days ago, Mila and I were following an SUV with license plate 000 NPE, which is quite amusing. I don't think it is a customized vanity plate – here in British Columbia, license plates have three numbers followed by three letters, or three letters followed by three numbers. It could be a genuine coincidence.




Figured out my favorite kind of music: poetry recordings

Tue, 08 May 2012 21:59:45 PDT

I don't have a favorite kind of music that I like to listen to. If you ask me, "What's your favorite kind of music?", I have no answer. I like a song, but I soon tire of it.

But there is a recording that I enjoy listening to over and over: The Caedmon Poetry Collection: A Century of Poets Reading Their Work. Here you can hear T.S. Eliot, e e cummings, Auden, Yeats, Pound, etc. reading their work. I wish there were a link to a page with some audio samples that I could share with you.



Is God fond of us?

Wed, 25 Apr 2012 09:50:55 PDT

Last night I was at a coffee shop with Mila and in the course of our conversation, she mentioned that "God is crazy in love with us." Father Dave said something like this a few weeks ago as well. My question is, is it proper to think of God as being deeply or "crazy" in love with me? It "would be nice", but I haven't heard or read this viewpoint from an authoritative source.Is God vengeful or loving? This question disturbed me, so I have spent the past three hours this morning Googling around for something, anything, that can help me to come to grips with this question. Is he both? Check out the famous icon of Christ Pantocrator below:Note how the left half of the face is gentle and the right half is stern, representing his human and divine natures. I like the gentle side but am a bit worried about the stern side.Many Christians intellectually believe that God is unconditionally loving, but in their hearts they believe that he is stern and vengeful. Here's a not-bad article that I came across on the subject. Google also linked me to an excerpt from the book What Catholics Believe which asks, "How can a God of love also be a vengeful God who demands suffering of his son?" It then starts to get good and talks about the parable of the prodigal son, but then suddenly, page 59-61 are not shown in this preview.Another book I turned to this morning was Good Goats, which was recommended to me some years ago. One idea from it that rings true for me is that God loves you at least as the person who loves you the most. Nice idea, right? I can believe it, but unfortunately the book is spoiled by some ideas that strike me as heretical, at least to a Catholic - it questions mortal sin and hell, which are traditional Catholic teachings, and this despite the authors being Catholic. So I needed to look elsewhere for answers.Long story short, I finally turned to Pope Benedict XVI's 2006 letter Deus Caritas Est (God Is Love). It is a long letter, but I needed to read it this morning. I was getting confused by all the various viewpoints on the question, and I needed something authoritative, a dose of sanity. I won't go into detail here (if you have the same question as me, go read it - it's great), but below are some highlights:While "God is the absolute and ultimate source of all being", he is "at the same time a lover with all the passion of a true love"."Marriage based on exclusive and definitive love becomes the icon of the relationship between God and his people and vice versa.""This divine activity now takes on dramatic form when, in Jesus Christ, it is God himself who goes in search of the “stray sheep”, a suffering and lost humanity."So my understanding now is that, yes, it is proper to view God as being "a lover with all the passion of a true love". Not the "puppy love" that the words "crazy in love with us" may evoke, but the deeper love that is more like that between husband and wife. Have I fully figured out what the love of God is like? No. As Augustine said, "If you understand it, it is not God." Is God vengeful? Maybe, in an odd, roundabout way - he can get angry (as husband and wife can), but he also provides a way out. Do I fully understand this? No. But I'm a bit more at peace with the idea of God being a lover, with the image of marriage being a key to understanding it.[...]



Rembrandt's painting "The return of the prodigal son"

Sun, 22 Apr 2012 16:03:10 PDT

You gotta love Rembrandt's painting, "The return of the prodigal son". That's the elder brother peeking around the column in the background.

(image)

Henri Nouwen has a highly reviewed book about this painting and the parable behind it. I haven't yet read the book, but it seems to be about moving from being the prodigal son, to being the elder brother, to being the welcoming father.



The Compleat Gentleman: 10 Favorite Quotes

Sun, 22 Apr 2012 14:08:05 PDT

There is a book called The Compleat Gentleman (2009) on what it means to be a gentleman. To be honest, I found a good deal of it boring, but it did have some good bits. Here are ten of my favorite quotes:

1. "He is a man who stands up for others - sometimes even for his enemies - often when those others have no clue that he is there for them."

2. "Most of the time a gentleman is just a mild-mannered fellow whom folks may take for granted. But when the job of saving the world comes up, there's a change in the man."

3. "There is simply no substitute for strength of character, and in boys, or men, this requires two things increasingly rare in our time: knowledge of the past and a vision of the future."

4. "The process of character development begins and matures in the home."

5. "Protect the weak and less fortunate."

6. "He is also a man of silence, a man reconciled to his own death."

7. "A gentleman is dedicated to the virtue of goodness. He believes he ought to do the right thing."

8. "He respects her, listens to her, and does all that he can to give her what she desires. This is true in terms of her existential ambitions, and it is equally - if not especially - true of her physical needs."

9. "Some of the most important things about a man are the things he keeps from most people all the time and from those closest to him until the time is right."

10. "'A gentleman,' Confucius said, 'is distressed by his own lack of capacity; he is never distressed at the failure of others to recognize his merits.'"