OS X Development Tricks

July 7th, 2010 chris

These are just some old notes I want to preserve on somewhat hidden features in OS X useful for development:

  • You can get smaller Finder windows with the pill shaped button on the top left. Useful if you are trying to conserve space or just like old style Finder windows
  • The Xcode default layout is similar to a lot of commonly used IDEs, such as Visual Studio and Eclipse. I spent most of my Macintosh programming time in MPW and Codewarrior, and prefer a less monolithic, overlapping window layout. You can achieve this by choosing the Condensed layout, but you must close all open projects to change it. This also makes the xed shell command work the way I want, because it brings up a new window for every file you open, instead of replacing the one you were just looking at.
  • The Finder doesn’t normally allow you to see certain files and folders, but if I’m working with Unix software, it is sometimes easier to move things around by dragging. You can open a folder in the Finder by using the shell command ‘open’, so if there is a hidden folder .libs, you can type ‘open .libs’, and up pops a Finder window for that folder. Remember, the usual permissions for your account will apply, so can can see folders like ‘/usr/local/lib’, but might not be able to modify them.

Posted in Technology | No Comments »

Some Kindle (App) Suggestions

June 28th, 2010 chris

Kindle Logo

I bought the first Kindle. Well, not the first one, but the first version. Then I bought the second version. Then the DX. I also downloaded the Kindle apps onto various devices, including an iPad. Finally I downloaded the Kindle app for the Mac. I had some suggestions for improving the apps, and Amazon kindly offered me an email address to communicate these. I decided I’d post them here as well:

Chapter Titles at Top or Bottom of Page

It would be great to have chapter titles visible when reading a Kindle book, maybe at the top or bottom of the page. With the lack of page numbers, it’s even harder to get a feel where you are in the book, even with a percentage and the location numbers shown.

Personally, I’d also rather have page numbers that change with type and screen size than no page numbers at all. The magnitude of the locations is just too great to fathom.

Two Page Display

I’d like the option to have two pages on the screen at the same time. Usually this would be the naturally occurring consecutive pages, but sometimes having the table of contents as the first page would be useful as well.

Option to Remove Side Margins

The book app has two gray bars on each side of the book content that seem to only serve as a place for the arrows to show up when the cursor is placed over them. Since you can just use the arrow keys to navigate between pages, I’d like the option to not have these margins.

When the app window is resized, the margins remain the same size, although the content window shrinks, thus showing less content. This seems backwards from a utility standpoint, and since screen real estate is scarce, it would be optimal to have the minimum amount of screen real estate used and still be able to read the book.

I’m using the app to read technical books on screen as I do related software development on a laptop. Right now there’s not a lot of room left on the screen for what I’m working on while referring back to the book.

Random Access / Quick scan

This feedback applies to the iPad app as well as the Mac app.

One of the advantages of a physical book is the ease of random access, the ability to scan quickly, as well as a physical sense of how far through the book you currently are. This is particularly useful when the book is technical or reference in nature. Often you know you’ve read something before, but you’re not sure exactly where it is, so you can flip rapidly through the book to find what you’re looking for.

One way to implement this for the Kindle apps might be to have (optional) margins that look similar to how the hidden pages of a book look, with vertical lines representing past and future pages. This probably works best with a two-page display, but could probably be made to work for one as well.

  • the thickness of the margin of lines would indicate how far into the book you are
  • sliding your cursor (or finger for a touch device) horizontally across the margin would show a very large thumbnail of pages represented by that position (scanning). Clicking, double-clicking or tapping could jump to that page, depending on what interaction scheme was used.
  • bookmarks could be visually shown as tabs with different colors and labels on them

Posted in Uncategorized | No Comments »

Welsh Rarebit

April 11th, 2009 chris

Serves 4-6 Ingredients

  • 1/4 C butter, 1/4 C flour
  • 1/2 tsp salt, 1/4 tsp pepper
  • 1/4 tsp dry mustard
  • 1/4 tsp worcestershire sauce
  • 1 C milk, 1/2 C beer
  • 2 cups shredded cheddar cheese

Melt butter in Med. saucepan over very low heat. Blend in flour & seasonings. Cook over low heat stirring until mixture is smooth and bubbly. Remove from heat.

Stir in milk, heat to boiling, stirring constantly. Boil & stir for one minute, gradually add beer to sauce mixture. Stir in cheese & heat until cheese is melted, stirring constantly.

Cube french bread & eat fondue style.

Posted in Food | No Comments »

CoverScout & Sonos

September 15th, 2008 chris

I’ve been working on some home automation stuff lately, including building out my music system with Sonos. One of the things I’ve noticed recently is how few of my album covers are showing up in the Sonos controller. it turns out Apple changed the way they store album art back in iTunes 7, and is now incompatible with where Sonos expects to find it. Sonos looks for album art either as a tag within the music file itself, or in a file called folder.jpg in each album folder. Apple probably had good reasons for changing the location of the artwork, such as efficiency of disk space and bandwidth, but that still leaves Sonos users with a less graphically interesting screen.

Well, it turns out there’s a product from Equinux called CoverScout that will help solve this problem. It runs through your library, filling in album art using the old tag within the file mechanism. Then it allows you to find other missing album art using Amazon or Google Images. It seems to work pretty well, and is a big timesaver. There might be other solutions out there, but for $19, this was worth it for me.

Posted in Technology | No Comments »

WordPress & Apache Virtual Hosts

April 27th, 2008 chris

WordPress_logo-web.png

Yesterday I spent about 4 hours trying to figure out why virtual hosts weren’t working for me, so I thought I’d spend a few minutes writing it down in case it helps anyone else.

I had originally set up a WordPress 2.5 installation in /var/www/blog of my Apache 2 document tree. This worked fine, but I later decided to use a specific domain for the blog (cristoblanco.com), and point it at the same server. Apache has a feature called Name-based Virtual Hosts that allows you to host multiple domains on the same server with the same IP number

In Apache 2, you put your new domain config file in the /etc/apache2/sites-available directory, and then enable it by running a2ensite. After following all the instructions, it still wasn’t working for me. When I typed cristoblanco.com into the browser, it went to the top level of my original domain instead. I did the usual google searches, and tried some of the things they suggested. It’s funny what you’ll try when you feel like you’ve exhausted all possibilities. Still no luck.

I woke up this morning and thought, well let’s debug this. I put an index.html test file into the blog directory, and tried cristoblanco.com again. It worked! So, it all started to make sense. Either php wasn’t working (WordPress uses an index.php file), or it was something else. Well it turned out to be something else. WordPress needs to be configured for the domain, otherwise it just redirects back to the top level of the domain. So I used their admin tool to change the domain name, and now everything works. Seems so simple when you look back at it, but that’s how bugs often are.

I hope this helps someone.

Posted in Technology | 2 Comments »

Round the World Airline Tickets

April 26th, 2008 chris

I can’t remember where I first heard about Round the World (RTW) airline tickets, but I’ve been intrigued ever since. The idea of packing up and circumnavigating the globe seems very appealing to me, and I’ve been looking into it ever since I left Google at the end of 2006. I still have other obligations to finish up before I actually board the plane, but I thought I’d write down what I’ve learned so far.

There are several programs available from various airline alliances and travel agents. Choosing one requires analyzing their strengths and weaknesses, such as region of travel, cost, and what airlines you prefer to fly. I’m in the United Mileage Plus program, so I gravitated toward the Star Alliance RTW Fare. In addition to the trip itself, a RTW ticket is a good way to move to more elite status within an airline’s program, enabling easier upgrades to business and first class, better airport lounge access, and other travel perks.

You have to follow certain rules with a Star Alliance RTW Fare, such as:

  • Must start and end your trip on the same continent
  • Must travel in one direction around the world (i.e. west or east)
  • Can’t backtrack or change directions outside of a continent (but within a continent is okay)
  • Have to stay within your mileage cap. The highest cap is 39,000 miles.
  • The trip must be longer than 10 days and less than a year.
  • There must be at least 3 stops and no more than 15 stops.

Star Alliance has a useful trip planner which validates these rules and knows the flights available for Star Alliance. The map below is the route I’ve been planning in the trip planner:

04-08-07-trip-map-01.gif

Something I found interesting was the costs of these tickets, particularly for business and first class fares. I’ve never traveled internationally on first class, but it can easily cost over $10,000 on a top-tier airline from the US to Europe, especially since I would be leaving from San Francisco (SFO). A first class Star Alliance RTW fare with a mileage cap of 34,000 miles leaving from SFO is listed as $11,200 on airtimetable.com. This is an opportunity to fly first class internationally, and what better time to do it then when you’re traveling so many miles.

By the way, the ticket prices differ based on the class of service, miles traveled, and where the ticket originates from. Some people have been known to travel to places like Sri Lanka to get as much as half price on these tickets, although you must then start and end your trip in Sri Lanka. How to get there and back is an exercise for the reader.

Posted in Travel | No Comments »

RasterRap

April 25th, 2008 chris

Before I left Sun Microsystems in 1990, I wrote a program called RasterRap that let you draw with images. I called it RasterRap because like some rap music, art was created by sampling others works. My inspiration for this was something we did as kids: Take a blank sheet of paper and draw a big square with a particular color of crayon. Then use a different color and draw over the first color. Keep repeating this until you’re tired of it. Finally, use the black crayon to draw the final layer. Now use a fingernail and scratch off the crayon at varying levels of depth. Yes, we were super bored.

The RasterRap program was written entirely in PostScript, and the current tool (like your fingernail) would let you reveal the chosen image with a variety of effects. Spray paint, stretch, paint, and spotlight were some of the tools. Why did I write this? Pretty much the same reason I scratched off crayon when I was a kid.

raster rap

Posted in Technology | No Comments »