Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Saturday, May 29, 2010

That split second when you can say something that changes things

Have you noticed that sometimes circumstances will come together to give you an opportunity to speak a word that could have significant consequences? It seems to me that every once in a while you find yourself with a set of people and a set of circumstances and, for a split second, if you recognize it, you have a chance to say something that will significantly alter the course of events, or significantly change the life of one of your hearers. It's like Fate gives you an occasional chance to speak a significant word, if only you are aware of it and seize it. But if you do not have the courage to speak up at this point, the moment is lost.

Whenever these magical circumstances come together, I'm going to speak the significant word, without pausing too long to consider whether or not it's a good idea, as the moment is too easily lost.

Wednesday, May 26, 2010

Nice UI design: jEdit search dialog

I love the power of the search dialog on jEdit (a free text editor for Windows, Mac, and Linux):

jEdit search dialog

  • The same dialog is used for both search and search-and-replace. So if you start off searching, you can change your mind and do search-and-replace instead. Or vice versa.
  • You can put regular expressions in the search and replace fields.
  • You can get a single list of all of the search results, if you want ("HyperSearch")
  • You can access previous values in the search and replace fields by pressing Page Up.
  • You can search-and-replace an entire directory tree, from this same dialog. I just did this now on a directory tree containing nearly 3000 php files.
  • You can put an arbitrary Java expression ("BeanShell") in the replace field. This can be pretty powerful.

Note though that jEdit needs some special configuration to get it to behave more Mac-like on OS X. I will write up instructions for that in a future blog post.

Tuesday, May 25, 2010

How to prioritize any list

This is a handy technique for prioritize a list. It's taken from the book What Color Is Your Parachute.

It's called the Prioritizing Grid. Someone has written a webpage to make it easy:

You simply enter your list down the diagonal. Then for each pair, you choose which of the two is the higher priority.

When you're done, you click a button at the bottom, and you are presented with your prioritized list on the right.

For example, I wanted to prioritize my evening activites (because I barely have time to get through even a few of them).

Here's my prioritized list. If I have time in the evenings, I'm going to start at the top and work down.

1. Mass on TV
2. Meditation
3. Review calendar items
4. Practice Latin
5. Review action lists
6. Exercise
7. Reading I
8. Memorize scripture
9. RSS Feeds
10. Reading II
11. Practice calligraphy

Saturday, May 22, 2010

Aristotle is hard to understand

So I thought I’d resume reading my Aristotle book, after an 8-month hiatus. Aristotle is supposed to be good for you right?

It took me an hour to understand this paragraph:

“It is evident also that in all the figures, whenever a deduction does not result, if both the terms are affirmative or negative nothing necessary follows at all, but if one is affirmative, the other negative, and if the negative is assumed universally, a deduction always results relating the minor to the major term, e.g., if converted it is necessary that C does not belong to some A. Similarly also in the other figures; a deduction always results by means of conversion. It is evident also that the substitution of an indefinite for a particular affirmative will effect the same deduction in all the figures.”
          —Aristotle, Prior Analytics 7

Anyone else read this stuff? I’m not wrong in saying it’s hard to understand right? Aristotle really needs to stick some examples in there.

After puzzling over it for an hour and drawing many Venn diagrams, I think what he’s basically saying is (for the mathematically inclined):
  • C ∉ B, B ∈ A ⇒ C ∌ some A. (The X∈X∈X pattern is called the “first figure”.)
  • O ∉ M, M ∋ N ⇒ O ∌ N. (The X∈X∋X pattern is called the “second figure”.)
  • R ∌ S ∈ P ⇒ some P ∌ R. (The X∋X∈X pattern is called the “third figure”.)

I think I like Plato better. At least he seems easier to understand (maybe “seems” is the operative word here):

“No, my excellent friend, trust in me and in the Delphic inscription and ‘know thyself’. These are the people we must defeat, not the ones you think, and we have no hope of defeating them unless we act with both diligence and skill. If you fall short in these, then you will fall short of achieving fame in Greece as well as abroad; and that is what I think you’re longing for, more than anyone else ever longed for anything.”
          —Plato, Alcibiades

Daily RSS Feed: 50 key dates of world history

I made a daily rotating RSS feed for Richard Overy's article on the 50 Key Dates of World History.

If you want to learn a little history, hop on board and subscribe with your RSS reader.

A couple of other daily rotating RSS feeds I made are the Baltimore Catechism and Tips from the Pragmatic Programmer.

3 Reasons I Like The Mac

Someone asked me why I like Mac better than Windows now. Three reasons came to mind:

1. Speed
2. Unixy goodness
3. Beauty

It's faster than my PC - it starts up quickly and the disk doesn't thrash.

It runs on Unix, which means I get to use all the great Unix tools natively instead of having to use Cygwin.

And what can I say – it's pretty.

Sunday, May 16, 2010

How to sync your Windows Mobile device with your Mac

If you've invested in a Windows Mobile device and you want to sync it to your Mac (and aren't planning to get an iPhone soon), I would recommend syncing your device using SyncMate.

The alternatives gave me trouble:
* Missing Sync stopped syncing. And it asks you to pay $40 up front with no trial. Their refund policy is that there are no refunds ("All Sales are Final" policy).
* PocketMac gave me an error on installation. I couldn't even get the PocketMac window to appear after installation. At least it has a refund policy.

I had the best luck with SyncMate. Go with SyncMate. There's a free edition and an expert edition.

One issue though with SyncMate is that it does not sync task categories - you lose any categories that you've assigned to your tasks. I use task categories quite a bit (for GTD), so my workaround is to put the category name at the start of each task (e.g. WaitingFor - ...).

Friday, May 14, 2010

How to put Safari in your Dashboard

I had a surprisingly hard time figuring out how to put a web browser in my Mac dashboard. It turns out that it is possible.

1. Install the Safari Light dashboard widget. It's not available anymore for some reason, but you can grab a copy from the Wayback Machine.

2. On the dashboard, Safari Light will ask you for a URL to go to. A good choice is . This will put a text field at the bottom of the page. You can enter URLs or Yubnub commands into this text field; for example: (to go to Google), gim porsche (to do an image search for porsches), or even xe -amount 1 -from CDN -to USD (to convert $1 from CDN to USD).


The source code for this Dashboard widget looks pretty simple, so it'd probably be easy to tweak.

And there you have it – a heads-up display for Safari. If you're into heads-up displays, also check out the Visor hack for Terminal.

Switching back to jEdit from TextMate

TextMate is one of the best text editors for the Mac. But as a long time jEdit user, I couldn't get past its lack of a couple of features that I love: highlighting all occurrences of a word, and splitting windows.

With a single keystroke, jEdit's Highlight plugin lets me highlight all occurrences of the word under the cursor (“initializationVector” in the example below):

Highlighting all occurrences

This is useful for seeing at a glance all the places that a variable or method name is used in a file.

The split-windows functionality is also handy and quite flexible:

Split windows

One thing that TextMate does really well is its ⌘-T command, which lets you go to a file by incrementally searching on its name. It turns out that jEdit has a decent imitation of it, called the OpenIt plugin:

OpenIt plugin

There are a lot of great features in jEdit, so I'm going to return to it as my primary editor. It does take some tweaking to get it working satisfactorily in Mac OS X – that will be the subject of another blog post.

Wednesday, May 12, 2010

Text-to-speech IRC client on Mac OS X

Here's how to get text-to-speech on an IRC client on Mac OS X:

1. Download the latest Colloquy nightly build. The latest nightly build fixes some issue that prevented it from working with Growl.

2. Turn on System Preferences > Growl > Applications > Application's Display Style > Speech

3. Turn on Show Event Bubble for the Chat Room Activity event in Colloquy

Update: I think Adium may be even better than Colloquy. Adium 1.4 has text-to-speech. It also speaks the name of the speaker, which Colloquy doesn't do. And I think it will speak private messages - again, something Colloquy doesn't do.

Saturday, May 08, 2010

Switched to Mac.

I am in the middle of switching to a Mac.

The quick startup and shutdown times are a nice change. It's nice that the disk isn't thrashing like it is on my PC.

I'm running the Mac and PC side by side for now - I have heard that there's a bit of an adjustment period.

Picked up David Pogue's book "Switching to the Mac: the missing manual" which should help with the transition. It seems witty and well written.