Chris Mar's Weblog Blog Different

Wednesday Apr 30, 2008

Welcome to last year Apple. I've never seen a good explanation of why Apple has taken so long to release Java 1.6 for Mac OS X. I remember attending WWDC in 2000 when Steve Jobs announced that Java would be a first class citizen on Mac OS X. Things looked promising, but times have changed. I could understand waiting for the first patch, but this is the 5th patch for Java 1.6. We have been using Java 1.6 on hundreds of production systems in my group for over a year. I can't tell you how annoying it has been to run a VM on my Mac just so I can develop with Java 1.6. The delay for the release has been painful, I'm relived that my life will be improved now

Java 1.6 is not installed as the default, its just available:

After doing Software Update:

cmar$ java -version
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)

when you type java at the command line, it invokes /usr/bin/java which is really a link to the Java Framework

Java Link

cmar$ ls -la /usr/bin/java
lrwxr-xr-x 1 root wheel 74 Apr 30 08:41 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java

Switching you default

If you want to switch your default then you need to either modify the link /usr/java/bin
sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java /usr/bin/java
You might have to do "rm /usr/java/bin" first to remove the link before creating a new one.

Or you can just create an alias in your ~/.bash_login
alias java=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java

Friday Mar 07, 2008

I didn't realize how difficult it would be to obtain a Time Capsule. I called every day this week and finally on Friday the Tyson's Corner Apple Store got 20 in stock, 10 of each size. They sold out in a couple of hours, luckily my wife was nice enough to leave work and pick it up for me. Judging by the comments from the Apple Store employee's these things are hot and they are dealing with tons of phone calls daily. Who knew it would be this hard to get a wireless router?


I did some initial speed tests from the other side of my house. I'm keeping the Time Capsule in 802.11n only mode:

Time Capsule Speed Tests

More updates soon as I figure out all the settings, this is more complicated then I normally expect from Apple :)

Monday Mar 03, 2008

When the new Mac Book Pros were released last week, I decided the Pynren and new touch pad didn't warrant an upgrade. So, I decided to upgrade my current 2.4 GHz Mac Book Pro. Here are a couple tips on ways to upgrade your current MBP and make it a Super Mac Book Pro.

Upgrade your memory to 4 GB

I was surprised how cheap laptop memory has become. You can get a 4GB matched set from Mac Sales for only $95.00 now. Amazing! Upgrading memory is very easy, Apple even has a help page.

Upgrade your Hard Drive to 320 GB

You can purchase this Western Digital 320 GB Passport 2.5" USB 2.0 Hard Drive for $169.99. Some guys at work found this drive for $149.00 at Best Buy. The trick is the drive inside is actually much nicer then the specifications posted on Amazon. Once you crack it open you will see that it is actually a Western Digital Scorpio (320 GB, 3 Gb/s, 8 MB Cache, 5400 RPM). A VERY nice drive for only $169.99.


Doing the upgrade is made very easy because of the external enclosure it comes with. You plug the drive in and use Disk Utility to "restore" your current drive to the external drive. Then you just have to crack open the drive, shown in this video being done one handed.


Once you have cracked open the WD case, you can open your mac book and perform the swap. I followed this photo walk through. After the 320GB drive has been installed, you can take your old drive and put it in the external case, so you still have 150GB external drive. I've decided to not reformat my old drive for about a month, just "in case".


The memory upgrade is very easy, the hard drive is a little more challenging. Please make sure you track all the screws and their locations because you pull a lot of them out and they are all different sizes. For tools you need a #00 screw driver and a T6 Trox. You can pick both up from Sears for about $4.00 each.


Note after your restart your computer from the hard drive swap. Spotlight will reindex everything. This took about 20 minutes and was spiking my CPU. At first I thought the new drive and memory was much slower, but once Spotlight (mdworker) stopped. Everything seemed much snappier then before I started.


Good Luck building your Super Mac Book Pro

Tuesday Feb 05, 2008

Recently, I was upgrading some Rails projects to Rails 2.0. For some reason they changed the name of view files from ".rhtml" to ".html.erb". While your old file names will work, I like to keep things nice and neat. Here is a tool that will help you do the mass renaming, and its free! I wish I had this utility years ago.
Many Tricks Website

Wednesday May 25, 2005

If you haven't been paying attention to the memory usage of your Dashboard Widgets, you should check out how much Active Memory they are taking up via your "/Applications/Utilities/Activity Monitor". If you hadn't noticed their memory usage is always increasing. After running 4 Apple supplied Widgets: Weather, Stocks, Calculator and Dictionary, for a week they were taking up to 20 MB each! They start around 6 MB when launched, but as time goes by they take more and more memory. I actually noticed my computers performance decreasing which lead me to this discovery. Others, have reported the same issue, with some people claiming their Widgets are using up to 300 MB.

For now, I've removed all Widgets from my Dashboard until Apple releases a patch. As a fix, you can restart the dock since the Dashboard process is owned by it. Or you can manually remove the Widgets from the Dashboard. Using Activity Monitor, you can "kill" the Widgets and they will restart.

If you guys check out your Widget memory usage and its huge, let me know. My friends Weather widget was taking 75 MB of Active Memory!

I can't believe the amount of hits this article is getting. Seems like more people are finally realizing this is a major issue. 10.4.2 is due soon, hopefully they will have a fix.

The current record holder in the comments is 517M for the Weather Widget!

Thursday May 05, 2005

After, upgrading my system to Tiger. I found that I could not click on any of the items on my desktop (They were accessabile via a finder window). During the upgrade, the desktop picture switched to a plain blue color. I could not switch the picture via System Preferences.

I was finally able to fix my issue by deleting the ~/Desktop/.DS_Store file and rebooting. This caused my desktop to rebuild itself. When the reboot came back, the image I had tried to select in System Preferences actually came up as well. Selecting of my desktop items returned as well. I'm feeling a little better about Tiger now :)

Note: if you are going to do this fix, you need to use Terminal to remove that file because its not visible via Finder.