Saturday, June 20, 2009

FileVault performance on OS X, Leopard (10.5)

fv.pngA couple of data points on FileVault performance on a new 17" MacBook Pro with Leopard (10.5.7):

Write speeds (4 tests):
  • 1 GB (from /dev/zero) write to non-FileVault space: 16.43s, 15.97s (about 60 MB/s)
  • 1 GB (from /dev/zero) write to FileVault space: 39.18s, 39.03s (about 28 MB/s)
Read speeds (6 tests)
  • 1 GB read from non-FileVault, write to non-FileVault: 16.52s, 14.60s
  • 1 GB read from FileVault, write to non-FileVault: 16.32s, 14.25s
  • 1 GB read from FileVault, write to FileVault: 36.3s, 35.41s


It's possible that disk caching might be affecting the results -- anybody know how to tell??

Bottom line:

It looks like there's a nearly-2.5x penalty in write speeds when writing to a FileVault-ed account, 27 megabytes/sec vs. 60 megabytes/sec. You do pay a price for some peace of mind. On the plus side the read speeds appear to be about the same.

Don't forget, if there's a chance someone's going to walk off with your machine, make sure you power it down. =)

Saturday, June 13, 2009

What's new with the iPhone 3G S?

People keep asking me this... Well, here's the answer, from MacWorld. This is a list of all the hardware improvements in the latest version, coming out next Friday (bracketed comments are mine):
  • The faster processor, more RAM, and new video circuitry
  • Improved battery life
  • The improved camera hardware [autofocus, tap to focus, 3 MP instead of 2]
  • Video recording, trimming, and sharing
  • The digital compass [also maps will rotate based on which way you're facing]
  • Voice Control [dial and/or control the iPod-part with your voice]
  • Accessibility improvements
  • Built-in Nike + iPod support [no dongle required, just the sensor in your shoe -- why doesn't it just use GPS?? maybe for people who run on treadmills or inside...]
  • HSPA7.2 compatibility
  • Open GL ES 2.0
  • Hardware encryption
  • Environmental improvements
The new iPhone OS 3.0 supports a bunch of new stuff too, including whatever was keeping the TomTom folks from releasing their software. The TomTom offering looks awesome -- though I wonder how hard it is to answer the phone when it rings... Or if you're on the phone if you'll miss a turn??

See the MacWorld article for more info on the new OS.

"... and why don't you have an iPhone yet?"

The lack of TomTom software was one thing keeping me from buying one. The other two are (1) having to switch to AT&T, and (2) the cost.

All my family (and my wife's family) is on Verizon, so a switch would mean going back to counting minutes (yuck).

As for #2, a pair of $200 phones plus $89 (1400 minutes on 2 lines (or $199 for unlimited)) + $30 data plan (required) + $30 unlimited messaging = $149 per month still feels a little pricey -- that's about twice what we're paying now for cellphones. It would save me from having to cart around a TomTom and an iPod, but I could buy new iPods and TomToms pretty often with an $80/mo. savings.

I figure our time's coming, just not yet.

Saturday, June 6, 2009

Hostnames with Airport Extreme

Just a quick tip for a narrow segment of the population.

If you have an Airport Extreme* (APX), and you want to refer to the other machines on your network by name instead of by IP address, set the "Computer name" in System Preferences -> Sharing. That computer will then be available at "(computer name).local".

The APX may need to restart to recognize the new name, which is done by going to "Base Station" menu -> "Restart..." in the Airport Utilities tool (in the /Applications/Utilities folder).

If you don't want to add ".local" on the end, go into System Preferences -> Network, Airport, Advanced..., DNS tab, then add "local" to the search domains. Looks like this has to be done on each computer.

Enjoy.
* One sidenote -- the APX is a $179 wireless 802.11 dual-band (g and n) router. I absolutely refused to pay $179 for a device that I can get from Linksys or Belkin for $59. Until, that is, after 3 years of irritating reboots (and trying to talk my wife through reboots), painful setups, and irregular behavior, I finally had enough and bought the APX. I had always figured I just wasn't a networking guy, but the manual setup of the Apple router required understanding of all the same concepts and it worked consistently right out of the box. Sorry Linksys and Belkin, try again.

Wednesday, June 3, 2009

File templating on the Mac

Have you ever been looking at a folder in the Finder and thought, "Now, what I want to do is make a new Word document here..."

It's not easy. Without this, that is: New File Here (AppleScript)

Setup

Download this file, double-click it to decompress it, then drag it into your home directory -> Library -> Scripts. (Create the Scripts folder if it doesn't exist.)

Then you should be able to select "New File Here" from the scripts menu when you're in the Finder:

scripticon.png


If you don't see that icon, go to Applications -> AppleScript and run the AppleScript Utility, and select "Show script menu in menu bar".

I use Keyboard Maestro to link that script to ctrl-n.

Now what do I do?

Step 1: Go ahead and run the script. It'll offer to create a templates folder in your library directory, and then it'll open it for you.

Step 2: Copy whatever templates you'd like to use into that folder. I went into Word, Excel, etc., and created blank files that looked exactly like I want new/empty files to look when I start one, and dragged those into that folder. Or you can use templates like envelopes, letterheads, etc.

Make sure you use the right extensions on the filenames. That's how the script knows what type of file you're wanting to create. (If you don't specify an extension when it asks for the new filename, it makes BBEdit text files.)

Enjoy.

Update: Now the file's actually readable! - BH, 4 June 2009

Friday, May 22, 2009

What I learned by reading Alan Greenspan's book

ageofturbulence.pngReading Alan Greenspan's book, The Age of Turbulence, has been a fascinating experience for me. I always struggled to understand how the world's economy works, and I think (perhaps dangerously?) that I mostly get it now.

So here are the questions I wish my kids would ask me someday about it, and the responses I think I'd like to give. Not sure how much is directly attributable to AG (some of it's probably Warren Buffet too), but I won't take personal credit for any of it that's right.

So how does the economy work, anyway?

Simply, the world is full of people making things other people want.

You (or someone you love =) makes or does something for someone else, and they trade you for something you want -- usually money.

Another way to think of it is "adding value". If you buy parts for $10, put them together and sell the product for $100, you created $90-worth of value. People make money and provide for their families by adding value. That's how places like Hong Kong and Singapore and Japan, with very few natural resources, manage to be such wealthy places -- they've figured out how to add lots of value to "stuff".

We're constantly consuming that value too, e.g. making a $3 burger disappear, putting miles and years on our cars that decrease the value, etc. So if we just stopped working, we'd quickly consume the value we've stored in the fridge, bank accounts, gas in the car, etc. -- and that's when the pain starts.

But as we figure out how to create value faster, our standard of living improves.

How come the US is so much better off than places like Africa and South America?

We in the US are incredibly more productive than they were a few hundred years ago. Why? Division of labor is one reason. If you have enough people around, each person can do one thing and get really good at it, and therefore be really efficient.

Education is another. It helps us figure out how to waste less time and make stuff better, faster, and cheaper.

Time is yet another -- it takes awhile to figure out how to build really good cordless drills, but now that we've got it worked out, lots of people can have one and use them to create value faster than we could before. We as a society invested the time, and now are reaping the benefits.

Here's an example. Suppose I could build 50,000 incredibly awesome dishwashers a day for $10 apiece, everyone would certainly be impressed at my efficiency =) -- and pretty soon everyone would have an incredibly awesome dishwasher, and their lives would (arguably) be better for it. Although an extreme example, that's a big part of what's going on. We build lots of great stuff faster and cheaper than other places, and have been doing it for awhile now.

... But China makes lots of things cheaply, how come they're still so poor?

They're doing better now, actually, but they still have problems. One, even though they produce *tons* of stuff, in many cases they're not adding as much value as their US counterparts. I'm sure iPods are made up of 5-cents worth of raw material (silicon, lithium, carbon, etc.), which (mostly) Chinese companies turn into a $15 unit (that's a guess) that Apple sells for $149. Apple's adding the lion's share of the value with their engineering, design, marketing, distribution channels, etc.

AG talks about another problem that other countries have: limited (or absent) property rights. If every time I get something it gets taken away from me (stolen by thieves, confiscated/taxed by the gov't), I'm going to start putting my energy into protecting or hiding my stuff instead of building whatever it is I'm good at building. So I go down to only a hundred $10 dishwashers a day and spend the rest of my time putting bars on my windows and a wall around my house. Then we might as well be in South America. And a lot fewer people will have incredibly awesome dishwashers.

Why can't the government just pay for everything?

It could.

China and Russia are great examples of the government trying to do and pay for everything. Have you heard about hordes of people wanting to emigrate there? Me neither, those places are mostly economic wrecks. Yet how funny is it that the Obama administration's policies look a lot more like socialism/communism than what brought us to where we are today.

AG talks about "economic populism", which is what South American presidents tend to end up with -- promising to spend government money to do all kinds of things for the people that the government can't afford to do. It gets them elected, but isn't a sustainable way to run a government.

For example, just because you promise free national healthcare doesn't mean that a bunch of doctors, nurses, and pharmacists will start working for free -- someone has to pay them to do all that work. In other words, somebody somewhere has to be producing the "value" that will be given/paid to those doctors and nurses -- and if it's not the employers of productive employees, who will it be? Likely you and me. And if you get sick more often than most, you probably like the sound of that. If not, though, you'll be paying for other people's doctor bills. Simple as that.

Remember, it's *our* money the government is spending! And although I'm fine with them building roads, maintaining the military, running the courts and police, etc., I'm not thrilled about government giving money to abortion clinics, paying for everyone's health care, sponsoring people's unemployment, subsidizing farming, etc.

So why not let American businesses foot the bill for the national healthcare system?

Consider how much of the value created in this country comes from American businesses. A lot! Jobs too. But our businesses are competing with those from China, Singapore, Japan, etc. Pushing the healthcare burden onto our businesses slows them down and drives up their prices. My $10 dishwasher will have to get a bit more expensive if I have to pay ten thousand dollars a year in healthcare for each of my employees -- and that makes it easier for a Chinese company to come in and undercut me. And if they do and drive me out of business, I'm out of a job, and not only do we lose my business' contributions to the national healthcare system, we also have a few more unemployed people to support.

American business is the engine that drives our country forward and creates value -- let's streamline it, not burden it down!

...

This next one's a little different from the other questions, but I'm not sure where else to put it:

If we get a lot of our oil from the Saudis, why don't they jack up the prices? It seems like they've got us stuck, a rich country with an oil addiction seems like a perfect target for price gouging.

I never understood this, I just always assumed they would be happy if the prices were to skyrocket and stay as high as possible.

But as with every balancing act, AG points out that as prices go up, people start figuring out how to get their energy elsewhere, or how to go without. And if pressed, we could come up with some cool stuff that would permanently lower our consumption rates. With Venezuela and Russia also churning out oil, a drop in consumption would upset the balance and put a glut of oil on the market and force prices to instead go far lower. (If everybody in the country already had one of my incredibly awesome dishwashers, how much do you think I could sell one for?) According to AG, that scenario happened in the 70's and the rate of "growth in consumption" "never fully recovered even as prices fell".

If that's the Saudis primary source of income, you can see why they don't want to mess too much with it.

Interesting.
Just a reminder, none of this is really mine (except for the wrong stuff) -- credit goes to AG (and to a lesser extent Warren Buffet). Still, if you made it this far, I hope that means you found something interesting or useful. =)

Wednesday, May 20, 2009

The Decathalon

running.jpgI heard an interesting story a few months back (not sure on the source).

Supposedly a guy entered a decathalon. He was a pretty good athlete, but not really the best at anything. In the 100m he was fast, but only came in 3rd. He wasn't great with the javelin, came in 7th. In fact, although he did fairly well on most events, he didn't win any of them.

When the last event was over, he was feeling pretty down on himself for not doing better. However, once the scores were tallied, this apparently mediocre athlete won the gold!

Why? Because in the decathalon, it's not the single event that matters, but the overall performance. That's true for life too.

Many extraordinary businessmen have extensive resumes and train-wreck marriages. Others have hundreds of Facebook friends but can't run half that many yards without collapsing. Still others have nice cars and neglected kids.

The key is balance.

This is the best counsel I've found so far for finding it:
"Most men do not set priorities to guide them in allocating their time and most men forget that the first priority should be to maintain their own spiritual and physical strength; then comes their family; then the Church and then their professions, and all need time."

- Harold B. Lee
I like the "all need time" part -- start with solid priorities, but be sure to allocate time to all.

Thursday, April 30, 2009

Amazing bicycle skills

This guy's incredible:



FYI, his name is Danny MacAskill. He's 23, and has been riding for 12 years. Given this video, I would be very sad but not at all surprised to one day hear he'd been killed doing this stuff.

Until that happens, though, I suppose I'll just sit here and be amazed. Don't miss the part starting at about 3 minutes in. Wow.

Does anyone read this thing?

views since Feb. 9, 2008