Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Sunday, December 30, 2007

RSS feed of Thomas Aquinas's Summa Theologica

Here is a daily RSS feed for the Summa Theologica. It gives you one article a day, and takes 8½ years to finish.

Better than spending $165 on the 5-volume set.

Tuesday, December 25, 2007

GridNote - A grid of sticky notes

GridNote is a webpage of sticky notes that you can use to jot down things you need to remember (like a timesheet log, or restaurant prices, or calorie counts).

GridNote uses a cookie to remember your notes - no database is involved, so your privacy is protected. Source code.

These sticky notes are perfectly laid out for you. If you've got a third monitor or some extra screen real estate, try putting GridNote there.

Fli334C

Monday, December 24, 2007

Current Ergonomic Setup

Picture 347

Here's the ergonomic setup that's currently working for me.

1. Keyboard: Kinesis Advantage ($300). These used to give me pain in my palms, until I started using SmartGloves (item 3). I like how this keyboard puts Ctrl and Alt on the thumbs instead of the pinky (which, if overworked, can lead to Emacs Pinky). I've also found the Microsoft Natural 4000 keyboard ($80) to be good; unfortunately it locates Ctrl and Alt at the pinky.

2. Trackball: Kensington Expert Mouse ($150). Using a mouse gives me various aches. This trackball doesn't, for some reason.

3. SmartGloves ($100). Keeps your wrists from bending backwards (pronation), by means of a hard foam strip down the back of your hand, and a beanbag under your palm.

4. Forearm support: rolled up towel ($0). Inexpensive way to prevent forearm pain, especially with the 1.5"-tall Kinesis keyboard.

5. Table, 26" high. This is a good height for me, as it keeps my elbows at right angles.

6. (Not shown) Good office chair with back support ($150).

Sunday, December 23, 2007

Programming Books and a $200 Amazon Gift Certificate

I received a $200 Amazon gift certificate and here's what I got:
  • Implementation Patterns ($34) by Kent Beck. Tips for maintainable code. Should be a fun read.
  • Patterns of Enterprise Application Architecture ($43) by Martin Fowler. Web presentation, concurrency, O/R, distributed objects.
  • Pro JavaScript Techniques ($30) by John Resig (jQuery creator). I'd watched a video of one of John's talks, and liked what I heard. I've read another JavaScript book (JavaScript: The Definitive Guide), and look forward to learning JavaScript best practices from this book.
  • Why Programs Fail: A Guide to Systematic Debugging ($58) by Andreas Zeller. The priciest book of the bunch. Looks like it's written in an engaging way. Hope to expand on the debugging techniques I learned from Debugging: The Nine Essential Rules.
  • jQuery Reference Guide ($31). jQuery is the new kid on the JavaScript-framework block, so I'd like to learn more about it.
Books which, alas, didn't make the cut:
  • Domain-Driven Design $44. Many reviews complained of its verbosity.
  • xUnit Test Patterns $45. Too long (900 pages).
  • Structure and Interpretation of Computer Programs $70. I should read this sometime.
  • Code Complete 2 $30. Read the original Code Complete some years ago. Wonder if the new edition merits a second reading.
  • Programming Pearls $30. A favorite of James Gosling and Tim Bray.

Friday, December 21, 2007

Programming Resources: Smalltalk Tutorial, PragProg Appendix, Searching Blogger Profiles

Programming-related resources I'm checking out:
  • Squeak by Example (PDF). Book-length Smalltalk tutorial. Smalltalk is a fun, quirky, OO language/environment.
  • Pragmatic Programmer (book) Appendix A: Resources. Lists interesting programming resources: Tcl, Mozilla source code, comp.object FAQ, Z Shell, JavaSpaces, Emacs . . .
  • Joel on Software (book) It's about time to read this again.
  • Search Blogger profiles to find people interested in X and Y: http://www.google.com/search?q=inurl:blogger.com/profile+catholic+software&hl=en&filter=0 . Useful for finding people for your highly specific social-networking group (like the Association of Catholic Computer Programmers). Even better, set up a Google Alert so you are notified about matching profiles.
  • Homepage Usability (book). Jakob Nielsen's critique of 50 homepages.
  • Refactoring to Patterns (book). Good synthesis of the ideas from two important books: Refactoring and Design Patterns. Can be a bit hard to read sometimes – I'm glad that examples are provided.
  • Windows Presentation Foundation Unleashed (book). I'm not currently coding in .NET, but Devin mentioned to me that WPF is "Microsoft's new way of doing UI and tying it to logic and is very powerful". Hoping to glean some ideas.

Sunday, December 16, 2007

Association of Catholic Computer Programmers

I would like to announce the founding of the Association of Catholic Computer Programmers, which unites two great interests of mine (and of many others, I hope).

If you are a Roman Catholic who counts The Pragmatic Programmer, Design Patterns, and Refactoring among your favourite books, come join the ACCP at http://accp.ning.com/

Thursday, December 13, 2007

PHP Regular Expressions: Recursion, Named Capture

Here's a PHP regular expression for matching *nested* parentheses (e.g. blocks of code):

    ((?:[^()]++|\((?1)\))*)

The ?1 is a recursive reference to the regex marked by the outermost parentheses. It is a feature of the PHP regex engine.

See Jeffrey Friedl's Mastering Regular Expressions, 3rd ed., p. 476, "Recursive reference to a set of capturing parentheses".

Another potentially useful regex technique is "named capture":

    ^(?P<protocol>https?)://(?P<host>[^/:]+)(?::(?P<port>\d+))?

Here you can use either $matches[0], $matches[1], $matches[2] or $matches['protocol'], $matches['host'], $matches['port'].