Friday, February 6, 2015

What do I use my iPhone for?

Aside from being an extension to my computer for things like email and web browsing, my iPhone has essentially replaced the function of all of the following devices
  • Watch
  • Calendar
  • Music player (for the car)
  • GPS/maps
  • Compass
  • Alarm clock
  • Scanner
  • Flashlight
  • Timer (for cooking, meditation, catnaps)
  • Camera (I no longer own a regular camera)
  • Calculator (although I prefer bc when I'm at a regular machine)

Sunday, December 28, 2014

Why I dislike air travel

I have flown a lot, mostly for work, over my career and I'm now at the point where I try to avoid air travel as best as I can.  Why?  I thought I'd put my thoughts down in this article.

First, I should say that I tried to maintain loyalty to a single airline--United.  I enjoyed the privilege of getting more leg room gratis, checked bags for free, priority checkin and boarding, and occasional use of a lounge when flying internationally.  In many cases, I chose to maintain that loyalty despite not having the best flights in terms of time of departure or arrival.  But those perks meant less and less to me because I started encountering delayed and cancelled flights and missed connections.

Here's a list of things that has increasingly become a routine annoyance with air travel for me.

The TSA experience
  • The not-so-uncommon uncourteous TSA agent when I chose to opt out from going through the scanning machine.
  • A pain to carry liquids and gels.  I don't know how many bottles of water I have lost to the TSA.  As far as other liquids go, I almost always go through the inconvenience of checking my bags.
  • Elaborate process of taking computer out, taking off outerwear, taking off shoes.
  • Picking up who knows what from those mats at the security checkpoints.  Those mats are filthy, absolutely filthy.
  • Long lines at busy airports.
Ever since "TSA pre" was introduced, I have been offered it only once and I was reminded of what airport security used to be like before 9/11--so quick and easy. Overall, the TSA experience is one that I best describe as one from an oppressive culture.  And despite all of this, they have a pitiful record of actually finding problems.

The airline experience
  • Delayed and cancelled flights, sometimes resulting in a missed connection.  
    • Having to run from one gate to the next on arrival for fear of missing a connecting flight.
    • No time for using the restroom or buying food even between long flights.
    • Sometimes the missed connection required an overnight stay, knocking out one day of the business trip.
    • Rescheduling and/or getting a hotel required waiting in long lines as an entire plane of people tried to reschedule their flights.
    • Sometimes had to also pick up bags from baggage claim.  Sometimes checked bag pickup was not offered so I had to live with old clothing till the completion of my trip.
    • If the cancelled flight could be attributed to bad weather, the stay had to be at my expense.  Being business travel my company picked up the tab, but even finding a decent hotel at the last minute was a problem.  Sometimes the flight would get delayed to due airline issues but by then weather would get bad and the airline would attribute that delay to the weather.
  • Reduced number of flights.
    • Poor choices of flight times because of fewer flights.
    • Overbooked flights reduces the possibility of getting to the destination on the same day if there is a delay resulting in a missed connection, or a flight cancellation.
  • Poor service from stressed-out and overworked flight attendants.
    • I had a cancelled flight one time because the crew was beyond their allowable hours due to the delay of the flight because of weather.
  • Poor maintenance.
    • Seats that are dirty because the cleaning crew didn't have enough time to clean the plane between flights.
    • Broken seats or other equipment.  The worst experience was a broken seat pan that would keep sliding off during the flight and the plane was full so I couldn't move to a different seat.
    • Dirty restrooms.
  • Limited food choices.
    • Because of diet requirements, I usually just carry my own processed foods which, even though are marketed as healthy, aren't all that great.  So I usually end up with all sorts of digestion issues after a trip.
  • Unhealthy cabin environment exacerbated by operating older, smaller aircraft.
    • Aircraft cabins are extremely dehydrating (~4-6% humidity).
    • Very noisy environment.  I only recently started using noise canceling headphones which help a good deal with relieving stress on the ears, but I still feel all the vibration in body hours after a flight.  Perhaps my body is a bit too sensitive.
    • Low cabin pressure.
    • All of these contribute to a feeling of fatigue after flights of even a moderate duration.
    • Newer aircraft address some of these problems, but because of cost cutting it's unlikely any airline will be upgrading its fleet.  Most of them just refurbish the interiors of their older aircraft.
  • Misrouted bags.
    • Could have been avoided if I didn't need to check it because of TSA issues.
    • Results in wasted time since I have to wait till all the bags make it to the baggage claim, and then stand in another line for customer service to report the missing bag.  This is made worse when it happens on a flight that was already delayed and got in an odd hour of the night to begin with.
  • Usurious flight change fees if you need to cut a trip short or extend it.  I have pretty much never done this for several years now.
The airport experience
  • Dirty restrooms.
  • Aging infrastructure.
  • Overcrowded.
  • Limited and overpriced food choices.
  • Poor management.
I took a trip on Southwest from Sacramento to Austin via San Diego in January 2017.  We got off the plane in San Diego and the only way to get to the connecting flight was to exit security and go through another round of dealing with the TSA.  In the process I lost the bottle of water I bought at Sacramento airport and a good deal of my patience.  There is absolutely no reason why the airport management could not have sealed off a section to allow transit passengers to get to their connecting flight without going through security.
In summary

When I think of the poor flying experience, it is enough to deter me completely from flying for pleasure.  Most of these problems are symptomatic of the cost cutting that has been, and continues to be,  experienced throughout the industry.  As mentioned in this article, those airlines that fail to participate in such cost cutting activities begin to hurt financially as they "lose out" and eventually have to give in.  So while United has been getting pretty bad ratings for the last couple of years or so, I don't think any of the other airlines offer much of a different experience.  The only airline where I have experienced a significantly better inflight experience is Singapore Airlines on an international trip.

As a result, for now I have decided that loyalty to any airline is, for the most part, worthless.  And I have been trying to minimize my air travel (even for work) to only when it is absolutely essential.

Log of bad experiences

6/21/18 -- DL 5768 from SEA to SMF delayed 2+ hours.  Informed about it only after getting to the airport and checking in.  Seat was dirty and I had to request paper towels & use water to clean it before sitting in it.

Tuesday, October 7, 2014

macOS stuff

This post is a collection of little things related to macOS (Mac OS X was rebranded macOS).  I will be updating it with some of my learnings and the various changes that I made to customize the shell for my use.

bash

.bash_rc vs .bash_profile

bash has two places where one can put startup commands -- .bashrc and .bash_profile.  .bash_profile is executed only for login shells.  .bashrc is executed for non-login shells.  If one has commands that only need to be executed for both, then one can create a .bash_profile and source .bashrc from there by adding the following line to the .bash_profile:

. ~/.bashrc || echo "problem sourcing ~/.bashrc"

On Mac OS all shells are login shells.  So I just use .bash_profile.

aliases and functions

Aliases are discouraged in bash, but I use them anyway.  An example of an alias I use is:

alias ls='ls -lF'

If I wanted to use a function, I would have used:

ls(){ command ls -lF "$@" ; }

One key difference between bash and csh is that in bash, aliases cannot accept arguments.  So for any such aliases in csh, one would have to define functions in bash.  For example, here's a function pg:

pg(){ open /Applications/iWork\ \'09/Pages.app/ "$@" ; }

At the command line I can simply say "pg file" and the pages application is started up with the file specified.

Case insensitive auto-completion

Create a file ~/.inputrc and add the following line in it:

set completion-ignore-case on

This will prevent /etc/inputrc from being used.  On macOS, there is no /etc/inputrc by default, but if there was you get around it by adding the following line as the first line in the ~/.inputrc file:

$include /etc/inputrc

findword utility

This is a useful utility which scans files for a given word within all files in all subdirectories from where the command is executed.

findword(){ find . -type f -exec egrep -i "$@" {} /dev/null \; ; }

macOS versions and hardware compatibility

Versions of macOS are described here.

Hardware compatibility (i.e. latest version of macOS) that is supported on any device can be found at EveryMac.com.  Just find a given machine and at the bottom of the page are the details regarding OS compatibility.  For example, for my 2010 Macbook Pro, the details are here (search for "Maximum MacOS" on this page).

Battery health
  • Applications -> Utilities -> System Information.
  • On the left, under "Hardware," select "Power."
  • There it will show the charge capacity, number of cycles, and condition.
  • If you need the design capacity, you have to use an app such as coconutBattery.
Disabling facetime notification sound

When receiving calls on a cell phone running iOS, the calls appear on macOS.  This causes an annoying sound, especially if one is already in the midst of a conference call via some other tool like zoom or skype.  To disable these sounds, do the following:

System Preferences -> Notifications -> FaceTime -> Play sound for notifications (uncheck)

Useful applications
Other useful stuff

Monday, September 15, 2014

Getting from Sacramento to San Francisco

This post is about the various options for transportation from the greater Sacramento area to the San Francisco area.  As you can see, there are several options, but none of them are really great.  Different options work better depending on where one is trying to get to and whether the trip is a day trip or longer.  I have only tried the ones marked with an asterisk.

Car*:  The obvious downsides to this option are the cost (miles on the car + gas + tolls + parking in SF/SFO) and the time taken.  Depending on the time of the day and the day of the week (Friday afternoons returning from the SF area tend to be worst), it can take anywhere between 2-5 hours.  A consideration is whether or not carpool lanes can be used.  Many of the carpool lanes require 3 or more passengers.  For payment of tolls, FasTrak is a great option since the FasTrak lanes move a lot quicker.  Assuming one doesn't get stuck in bad traffic, it is the quickest option, since all of the other options involve some additional planning and/or detours to a station and/or parking at the station.

One way rental car*: This has many of the disadvantages of the prior option, but if one is flying out of SFO, this may be worthwhile since you don't have to pay for parking once to get to SFO.  I have done this only once and that is because I needed to stay the night at a friend's place before flying out the next morning.

Amtrak*: The Capitol Corridor has service between Auburn and the South Bay.  It is quite pricey and if you can't get a ride to or from the station then you need to worry about getting there by car and parking or taking a cab to the station.  The trains are sometimes late and very occasionally they can be cancelled.  They have WiFi on some trains.  For getting into the city, they have Amtrak buses that one would connect to at the Emeryville station.

Amtrak+BART: Depending on where you're trying to get in the SF area (e.g. if you need to get to SFO, Amtrak won't get you there), another worthwhile option may be taking the Amtrak and then transferring to BART.  The recommended station for making the transfer is Richmond.  This option may not be suitable if one has a lot of luggage, though.

Car+BART*: Some folks like to avoid the bad traffic getting into San Francisco and also avoid paying expensive parking in the city.  They end up driving to a BART station. El Cerrito del Norte is supposed to be one of the better stations; it's easy to access from the highway, in a relatively safe area, and has cheap parking.  When I ended up using this method, I went to El Cerrito Plaza (different than El Cerrito del Norte, even though that's where I thought I was going!).  Parking at BART stations is free on weekends and holidays, round-trip fare is < $10 to most places in SF, and total trip time (driving from Rocklin to El Cerrito Plaza, buying a ticket, getting on the train, getting to the destination) was about 2 hours and 15 minutes.  This is really the best option for a trip that is only to the city (rather than to the Peninsula or South Bay).  BART stations also have long term parking for up to 30 days so one can park and go to SFO, but it apparently fills up (I have no experience with that).  It is possible to make a reservation for a parking spot, but you have to get there before 10 am on the day of the reservation in order to guarantee availability.

Door to door shuttle*: If SFO is the destination, Davis Airporter offers a door-to-door shuttle service.  It is a reasonable option for one passenger but it can get pricey for a family.  They charge extras if one has many pieces of baggage and detours to pick up and drop off passengers means budgeting extra time for the trip to the airport.  But it's perhaps the most convenient if one has a lot of luggage.  Their shuttle vans use natural gas.

Bus: Greyhound and Megabus also offer bus service to San Francisco.  Megabus is priced quite reasonably.  The downside is that bus rides aren't typically the most comfortable (at least that's the case for me) and the pickup and drop-off locations are very limited, compared to say Amtrak or BART.

Car+Ferry: There is a ferry service from Vallejo to the city.  One would need to drive to the ferry terminal and park there.

Amtrak+Ferry: You can start the trip by Amtrak and connect to the above-mentioned ferry service at Oakland Jack London Square to get to destinations such as Angel Island that are not served by Amtrak.

Airplane*: United offers service between SMF and SFO.  I have used this option when connecting to flights in SFO.  It is one of the worst options as the flights are often delayed and sometimes even cancelled resulting in missed connections.
If you have a favorite way of getting to San Francisco from Sacramento that is not listed here, let me know.  I'll update this post as and when I find out about others options.

South Bay

Getting to the South Bay by public transport is a challenge because one typically needs to have a car once one is there.  But if one is being picked up by friends, then the options are Amtrak (leaves from Sacramento), and ACE (much more affordable than Amtrak, but leaves from places that are halfway between Sacramento and South Bay, like Stockton.

Thursday, August 21, 2014

Organic food industry in the USA

What's Holding Back the Organic Revolution? from the Organic Consumers Association provides a nice summary of the state of the organic food industry in the US.  Along with discussing the size of the industry, it also discusses the various challenges facing the industry and why it's not taking off as quickly as it could:
  • Cost of the food -- can be onerous for lower income families.  However the author points out that it can be a trade-off between pay now (for food) or pay later (for poor health).
  • Lack of time for meal preparation and easy access and availability of processed foods.
  • Lack of expertise (both at a nutrition and culinary level) for preparing meals with ingredients from scratch which causes people to depend on food from restaurants (mostly chain restaurants).
  • Fraudulent marketing and advertising, e.g. labeling foods as "all natural."  See, for example, this video by Only Organic.
Foodbabe is an excellent resource of what really goes into processed foods for both off-the-shelf products as well chain restaurants, along with tips for eating healthy.

Wednesday, July 9, 2014

Simple investment portfolios

I have previously written about worry-free investing (my first blog post!).  I have more or less being following that approach (i.e. mostly fixed-income investments).  However, the monetary policy of the last few years in the US has made me start to rethink that approach.  Historically low interest rates (typically < 1% on a savings account) coupled with stocks going sky high (a nearly 200% gain since the low of March 2009) makes me feel like I'm "missing out."  In all likelihood, I will never actually implement any of these portfolios, but the primary reason for this, as with my post about ways to own gold, is to consolidate my learnings on this subject.  I will continue to add to this as I learn more about the subject.

The basic asset classes

Most simple portfolios comprise a weighting of 2 or more of the following asset classes.
  • Stocks (small cap, mid cap, large cap, ...)
  • Bonds (short term, mid term, long term, ...)
  • Real-estate
  • Precious metals
  • Cash
Simple portfolios

The following are are of the simple portfolios that are supposed to weather all economic times.  They are supposed to work on auto-pilot using a fixed allocation of various asset classes and so they require minimal maintenance.  These simple portfolios also tend to have better returns than many actively managed funds when measured over longer periods of time.
I should note that none of these portfolios was able to successfully dodge the financial crisis of 2008-2009.  In particular, here's an excellent article by Doug Short on the pros and cons of the Permanent Portfolio Fund, and another one about diversification.

There are variations of these to try to bring in more diversification, but I think that unnecessarily takes away from the simplicity.  If I ever decided to try something different than the worry-free investing approach, it would probably be one of these or a very minor modification of it, e.g. 20% in an S&P500 index fund and the rest in US treasuries or cash.

Several "lazy" portfolios are described here.

Timing the market

All of the above simple portfolios are of the set-and-forget type.  At most, the only maintenance that may be recommended would be rebalancing at the end of each quarter or at the end of the year to make sure the asset allocation hasn't moved too much off target.  The effect of rebalancing is widely debated.

Is it possible to time the market?  I'm not sure if it can be done reliably.  In the short term the answer is a definite "no."  In the long term, it may be possible by careful observation and interpretation of macroeconomic data.  I have been following several economic blogs since 2005, and only one of those blogs -- CalculatedRisk -- has made several correct predictions about the economy, including recession calls, and the bottom of the real-estate market in terms of home prices and inventory (see the "economic predictions" section towards the end of this post).  However, the author of that blog refuses to offer investing advice.  If he is actually able to call the next recession correctly, I think I will have to assume that timing the market is possible!

I recently came across this article from Doug Short (he updates this at the end of each month) which explains a market timing strategy based on moving averages as described in the Ivy Portfolio.  Doug's page is updated monthly with the signal that indicates whether to remain invested in the fund or stay in cash for each of 5 funds - VTI (total US stock market), VEU (world, ex-US), IEF (7-10 year treasuries), VNQ (US REIT), DBC (commodities).  Scott's Investments has a nice spreadsheet for the Ivy Portfolio that is updated in real-time.  The moving average strategy for various durations can be backtested here.

Finally, someone in the bogleheads.org community suggested this method which takes into account both market trends and the unemployment rate.  Apparently using two indicators avoids some of the whipsaws that the Ivy Portfolio method is subject to.

Market valuation indicators

The following are some of the indicators used for measuring the valuation of the stock market (i.e. to determine whether stocks are over- or under-valued).  Because periods of over- and under-valuation can persist for long periods of time, they are perhaps only useful in terms of what to expect in the long term.  Additionally, there are other factors such as interest rates that affect the valuation at any given time.  But here are the indicators:
Some useful tools and references