Blog

All Posts (71)

From the Decree Concerning Justification:

  • "...Christ Jesus was given by God to men [not only] as a redeemer in whom to trust, [but also] as a legislator whom to obey..."
  • "...the justice received [is] preserved [and] increased before God through good works..."
  • "...the just [ought] for the good works done in God to expect and hope for an eternal reward from God through His mercy and the merit of Jesus Christ, if by doing well and by keeping the divine commandments they persevere to the end..."
  • "...he who has fallen after baptism [can] by the grace of God rise again[; he] can indeed recover again the lost justice [with] the sacrament of penance..."
  • "...after the reception of the grace of justification [a] debt of temporal punishment remains to be discharged either in this world or in purgatory before the gates of heaven can be opened..."
  • "...the good works of the one justified are in such manner the gifts of God [and] also the good merits of him justified; [the] one justified by the good works that he performs by the grace of God and the merit of Jesus Christ, whose living member he is, [truly merits] an increase of grace, eternal life, and in case he dies in grace, the attainment of eternal life itself and also an increase of glory..."

Here is how I interpret the Decree:

Not State of Grace State of Grace
1. Before you were baptized, all hope was lost. 2. After you were baptized, all hope was gained.
3. When you committed a mortal sin, all hope was lost. 4. When you underwent the Sacrament of Penance/Confession, all hope was gained.
5. When you failed to perform the good works that God gave you the grace to do, all hope was lost. 6. When you performed the good works that God gave you the grace to do, all hope was gained.

If you die in the state of grace, then by God's grace, you merit the attainment of eternal life. (A debt of temporal punishment remains to be discharged, either in this world or in purgatory, before one would enter heaven to be with God.)

Read more…

Random melody generator

Have you ever had to come up with a melody line for a song intro, but weren't inspired to make something up? I play the violin for the Surrey 1 Couples For Christ music group, and there is never violin sheet music for the songs that we play. If the song is on YouTube, I can write down the lead guitar part. But if not, then I don't know what to play, and I'm not always good at creating something from scratch.

So what I am trying today is the Melisma Stochastic Melody Generator from Carnegie Mellon University. Enter the key and whether it is major or minor, then press "Generate Melody", and you will get a midi file with a generated melody.

Here is an example you can listen to.

Then, if you read sheet music, you can use a MIDI to sheet music converter. I haven't found a good one yet though.

Update

A good way to turn your midi file into sheet music is to download ScoreCloud, choose to Record, then play the midi file using QuickTime. You get simpler results by recording with your microphone than importing the midi file, which produces a messy result.

Read more…

I am reading Cardinal Ratzinger's "Introduction to Christianity", and I must say, the following sentences are impenetrable, at least for me. I have no idea what they mean:

To be sure, it is a characteristic of understanding that it continually goes beyond our mere ability to apprehend and attains the awareness of the fact that we are comprehended. But if understanding is the apprehension of the fact that we are comprehended, then that means that we cannot yet comprehend that fact once again [in a second moment of understanding]; it furnishes us with meaning precisely because it comprehends us.

Not grokking that. At all.

But the rest of the book is pretty good so far.

Read more…

Keirsey Temperament Sorter

According to the Keirsey Temperament Sorter, my personality type is E/I-N-F-J.

Here is a description of INFJ:

INFJs are gentle, caring, complex and highly intuitive individuals. Artistic and creative, they live in a world of hidden meanings and possibilities . . .

. . . They put a lot of energy into identifying the best system for getting things done, and constantly define and re-define the priorities in their lives . . . 

. . . INFJs are concerned for people's feelings, and try to be gentle to avoid hurting anyone. They are very sensitive to conflict, and cannot tolerate it very well . . .

Because the INFJ has strong intuitive capabilities, they trust their own instincts above all else. This may result in an INFJ stubbornness and tendency to ignore other people's opinions . . . On the other hand, INFJ is a perfectionist who doubts that they are living up to their full potential . . .

Read more…

Jon's 1-Month Rule

Are you trying to figure out if you should buy the expensive version of something or the cheap version?

Just use Jon's 1-Month Rule: Am I going to use this at least once a month?

If so, then buy the more expensive one.

*

The same applies to time and energy. If you are going to use it less frequently than once a month, then don't waste much time researching reviews, nor much energy stressing about your purchase afterwards, etc.

Read more…

Canadian NextDoor.com: GoNeighbour.org

This is interesting for Canadians waiting for the NextDoor.com neighbourhood social network to open in Canada. It's called GoNeighbour.org and it looks like the same sort of thing, but for Canadian neighbourhoods.

The funny thing is that there are only like 2 pages on the internet that link to it. Wonder why there aren't more articles about it.

Read more…

APA Style Validator

My wife needs to write some papers that conform to APA style/references. I looked on the web but couldn't find a validator/lint program for APA style.

So I wrote this one: APA Check. It only has a few checks right now, but that will grow. It's written in JavaScript so it's easy to hack and submit pull requests.

Read more…

You are Orange

"People who are ORANGE are often spontaneous and flamboyant. They need a lot of variety and freedom. They take pride in being highly skilled and in being able to do several things at a time. They enjoy "hands on" work and often are good in a crisis. They are risk takes, seek challenges and are optimistic."

From the True Colors Personality Test.

Read more…

Don't just "make something". Rather, "make good".

Every so often on Hacker News, there is an article calling upon everyone to "make something". There is the Maker Culture (Wikipedia) and Maker Faire and Maker Spaces. And the mantra is "just make something". Anything. It does't matter. Just Make Something!

I don't agree with this philosophy of life at all. It seems so shallow. A better philosophy is the Catholic (and Aristotelian) one given by Joseph Pieper in his book The Four Cardinal Virtues (archive.org): that the ultimate goal of a human being is to "love the good and accomplish it".

How to do that? Here are some examples from a Guide for Confirmation Sponsors that I received today from my parish:

  • Spiritual Works of Mercy
    • Be the first to bring peace; never hold a grudge.
    • Encourage those who are discouraged by difficulties in trials.
    • Give your sympathetic understanding to your friends and family when they are in sorrow
    • Pray for all the people that you know whether they are living or dead.
  • Corporal Works of Mercy
    • Freely give to charitable organizations.
    • Give useful clothing to the poor.
    • Help with babysitting.
    • Attend funerals.

I would rather do any of the above works of mercy than make a pinwheel operated by a DC motor controlled by a Raspberry Pi computer. 

Read more…

Fr. Larry's homily

Fr. Larry gave a nice homily last Sunday on the Feast of the Holy Family. Main point was that the family is all about:
  • Love: Giving of oneself.
  • Prayer: Going to the Source to fill oneself up with love to give to others.
  • Sacrifice: Uniting love and prayer.
  • Forgiveness: Essential for marriage.
Read more…

Photo Storage Strategy

My wife and I are taking more photos these days, and like most people, we now need a "photo storage strategy" - a solution for managing all of the digital photos we take. We have a couple of thousand old photos, and new photos coming in via our iPhones and our digital camera.

Our criteria for the system were:

  1. Easy-to-use photo management software for the wife.
  2. Large storage capacity (the 60GB on the Macbook Air was filling up fast).
  3. Cloud backup.

The solution we came up with was:

  1. iPhoto. Wife was already using it.
  2. 1TB external USB drive that we already have.
  3. CrashPlan $6/mo cloud backup.

We considered various alternatives.

  1. Alternatives to iPhoto: Picasa. But people say it's not so easy to use. Plus my wife already knows iPhoto, although she finds the photo-book functionality annoying to use. I told her to just use albums instead of photo-books.
  2. Local Storage: For network drives like Synology ($500) or Zyxel ($250) I'd rather not pay. A nice thing about the Synology is that you can do headless backups (no computer required) - I'm not sure about the Zyxel. There's also the WD MyCloud ($150) but it has terrible reviews.
  3. Cloud Backup: Google Drive and Dropbox don't seem to work well with external USB drives. MS OneDrive says that they do work with external USB drives, but I don't trust it, given that Google Drive doesn't. So I'm left with CrashPlan and BackBlaze, which are pretty much on par with each other.

One cool thing I discovered about iPhoto is that when I sync our iPhones and camera with it over USB, it figures out which photos have already been imported, so it imports only the new ones. Nice!

Read more…

Apple Maps GPS is way better than Google Maps GPS

Because:

* It gives you the information you need (turn arrow and distance to the turn) in a high-contrast, large font. With Google Maps, I glance down and I can hardly read the information – it's dangerous.

* The street lines are thicker and contrast strongly against the background (unlike Google Maps, which is white on cream).

* The view is tilted, like a regular GPS, unlike Google Maps, which is straight down.

Read more…

Vine video as the sonnet of this generation

I have been wondering what is the attraction of Vine videos - those six-second looping videos.

Then today I was reading about the sonnet (16-line poems), and how popular they were in England in the 16th century. Maybe Vine is the sonnet of this generation?

Consider the following description of the sonnet - note that it has some similarity to a Vine video with its 6-second constraint:

Very often these love poems were addressed to a small circle of congenial spirits—fellow poets, wits, ladies of fashion—whom the poet wished to amuse. The way to impress this company was to exhibit special ingenuity in devising new variations on the old theme or in polishing one's work to an impressively high gloss. The reproach that such poetry is “insincere” would have astonished any Elizabethan. The rules were there with all the weighty authority of tradition behind them, and they were there to be followed. To depart from them would be as incomprehensible as if a chess player were to propose a change of rules to his opponent in order that he “might express himself better”.

—Adventures in English Literature

Read more…

Programming by Equivalence

I would like to introduce a programming technique called “Programming by Equivalence”. You can't use it all the time, but when you can use it, it’s great.

Problem: You have an existing feature X, and you want to implement a similar feature Y.

Solution: For every line of code for X, create a line of code for Y.

The beauty of this technique is:

  1. You don't need to think much - just find each line of code for X and make an equivalent line of code for Y.
  2. You know when you are done: when every line of code for X has an equivalent line of code for Y.

Here is a script that can help you to do 1 and 2 above. Just tweak the variables in the script to match your own code. Suppose you have implemented Google +1 buttons in your codebase, and now you want to add LinkedIn buttons. Run the script, and you will get output like:

lib/XG_ConfigHelper.php::: return B()->getMainConfig('googlePlusOneEnabled') === '1';
lib/components/bundle/controllers/EntryController.php::: if (R('XG_ConfigHelper')->isGooglePlusOneEnabled()) {
lib/components/bundle/lib/EntryListService.php::: if (R('XG_ConfigHelper')->isGooglePlusOneEnabled()) {
lib/components/bundle/lib/MustacheTransformer.php::: ->socialButtons()->googlePlusOneButton($entry);
lib/mustache-templates/v1/bundle/article/list.mustache::: {{{googlePlusOneButtonHtml}}}
. . . . . . . . . .

Note that the script looks for the X string (in my case, googlePlusOne) and checks if a corresponding Y string exists. The script outputs any X lines that do not have corresponding Y lines.

Using this technique, the creation of feature Y becomes mechanical. You keep running the script, and keep implementing the lines that it finds. If there are any lines that are false-positives, you mark those lines in the script. When the script's output is empty, you're done.

Thus you can be quite confident that you have thoroughly implemented the new feature.

Read more…

Cool: LibaryThing tag cloud

This is cool - if you input all of the books you own into LibraryThing, you can get it to display a tag cloud of your interests. Here are mine. Catholicism, poetry, and programming pretty much sums it up.

Read more…

Studying the QuickDraw source code

According to the interview with Donald Knuth in the book Coders at Work, Bill Atkinson's work is "well-documented code with lots of pioneering graphics algorithms in it." Let's review his code together - I created this public code review of his QuickDraw code. Come and leave comments on it and let's learn together.

Read more…

Wow. Just yesterday I opened one of my favorite books, Revolution in the Valley, containing war stories about the creation of the Macintosh computer. I was reading all of the introductory matter carefully (the scans of an engineer's notebook) when I noticed that one of the pages contained signatures of several original members of the Mac team. Note in the accompanying photo the signatures of Woz, Bill Atkinson, Daniel Kottke, Caroline Rose, Andy Hertzfeld, Bud Tribble, and Susan Kare (with the ⌘ symbol).

This is really cool. It's funny to think that this is inside a book I bought for $12.99 from a used bookstore in Victoria BC several years ago.

Read more…