<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Aaron Feng: Category mac</title>
    <link>http://www.aaronfeng.com/articles/category/mac</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Adventures in software development</description>
    <item>
      <title>Data recovery part 1: Freeze the dead hard drive</title>
      <description>&lt;p&gt;&lt;img src="http://www.aaronfeng.com/files/frozen_hard_drive.jpg" alt="frozen&lt;em&gt;hard&lt;/em&gt;drive"/&gt;&lt;/p&gt;

&lt;p&gt;I am sad to say that the hard drive in my Macbook died a few days ago.  When I boot up the laptop all I see is a blinking folder with a question mark on it which means that it can't find necessary files to startup up the OS.  I tried to run the Disk Utility from the OSX install CD, but the hard drive isn't even mounted.  To make matters worse, the last backup I had was from 2 months ago.  &lt;/p&gt;

&lt;p&gt;Right before the hard drive crash I was just starting to gain some momentum on my side project.  Now everything is gone, including my motivation.&lt;/p&gt;

&lt;p&gt;I poked around &lt;a href="http://discussions.apple.com/index.jspa"&gt;Apple Discussions&lt;/a&gt; and found out a lot of people are having similar hard drive problems.  Some people were able to retrieve their data by sending the hard drive out to a data recovery service.  I called one and I realized I'm in the wrong business!  The price ranges from $1500 to $2000 if the data can be recovered.&lt;/p&gt;

&lt;p&gt;In disbelief, I went to the all knowing god, Google, for answers.  I came across a couple sites that have claimed success on temporarily "fixing" a dead hard drive by putting the entire drive in the freezer for a few hours.  Supposedly this will allow the hard drive to function for 10 to 30 minutes depending on the condition of the drive.  Sounds pretty bogus to me, but desperate time calls for desperate measures.  I have nothing to loose, so I decided to give it a go.&lt;/p&gt;

&lt;p&gt;I sealed the hard drive in a couple zip lock bags and left it in the freezer for 3 hours then I stuck it back into my laptop.  I boot up the Macbook with the frozen drive, hoping it would buy me enough time to backup a few items.  Just a few seconds into the boot process, I see the blinking folder with the question mark again.  I repeated the process a couple of times without any success. &lt;/p&gt;

&lt;p&gt;Freezing the hard drive is only my first attempt on recovering the data.  I purchased an identical hard drive from ebay and am hoping to repair it by swapping out parts.  More to come in the next post.  Before I go, I just want to say If you haven't been backing up your data recently, DO IT NOW!&lt;/p&gt;</description>
      <pubDate>Thu, 31 Jul 2008 08:30:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:bd7fa0ee-e759-4d9e-889a-c09965e4815e</guid>
      <author>Aaron Feng</author>
      <link>http://www.aaronfeng.com/articles/2008/07/31/data-recovery-part-1-freeze-the-dead-hard-drive</link>
      <category>mac</category>
    </item>
    <item>
      <title>Bring in the new year with Gutsy Gibbon, Parallels, Ruby, and Rails</title>
      <description>&lt;p&gt;A few days ago I came up with an idea for a side ruby (possibly using rails too) project.  After doing the initial research, I realized it makes more sense to test out the idea on Linux instead of OS X.  I don't want to change the setup of my MacBook since I'm just toying with the idea, so I decided to install Linux using &lt;a href="http://www.parallels.com/"&gt;Parallels&lt;/a&gt;.  Parallels is a virtual machine for Mac that is capable of running any operating system.&lt;/p&gt;

&lt;p&gt;There has been a lot of hype around &lt;a href="http://www.ubuntu.com/"&gt;Ubuntu&lt;/a&gt;, so I decided to give it a try.  The latest version at the time of this writing is 7.10 (codename Gutsy Gibbons).  Installing Ubuntu on my MacBook via Parallels was a much more difficult task than I expected.  Shortly after I started the installation, I was faced with the following error:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The display server has been shut down about 6 times in the last 90 seconds&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After some googling, I found the fix on &lt;a href="http://infosonic.wordpress.com/"&gt;Shane Duffy's&lt;/a&gt; blog - &lt;a href="http://infosonic.wordpress.com/2007/10/21/ubuntu-710-install-guide-parallels-macbook-pro/"&gt;Ubuntu 7.10 Install guide - Parallels Macbook pro&lt;/a&gt;.  The installation worked as expected.  However, Unbuntu wasn't able to connect to the internet during the installation, so the software package management system (apt-get) configuration file was commented out.  apt-get is similar to &lt;a href="http://www.macports.org/"&gt;MacPorts&lt;/a&gt; on Mac.  I uncommented all the locations in the /etc/apt/source.list.  I ran the following command to get the system up to date:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;apt-get update
apt-get dist-update&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The apt-get is pretty slick.  Learning more about it will definitely pay off in the future.  A good place to start is the &lt;a href="https://help.ubuntu.com/community/AptGetHowto"&gt;AptGetHowto&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Moving on to the ruby and rails installation.  apt-get wants to manage all the packages it installs, so installing gem using apt-get won't be feasible.  &lt;a href="http://tech.waltco.biz/"&gt;Walter Wilfinger&lt;/a&gt; has posted complete instructions on how to get ruby and rails running in his post &lt;a href="http://tech.waltco.biz/2007/12/24/installing-ruby-and-ruby-on-rails-in-ubuntu-710-gutsy-gibbon/"&gt;Installing Ruby and Ruby on Rails in Ubuntu 7.10 Gutsy Gibbon&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Last but not least, I found it annoying that I can't use the apple key as control key in Ubuntu.  Once again I found a post written by &lt;a href="http://muffinresearch.co.uk"&gt;Stuart Colville&lt;/a&gt; on how to &lt;a href="http://muffinresearch.co.uk/archives/2006/08/13/running-ubuntu-under-parallels-desktop-for-mac/"&gt;remap the apple keys&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Wait, the system is not complete if you can't watch videos on youtube.  When I tried to open a video on youtube firefox prompted me to install the missing flash plugin.  Don't install it, it won't work.  Download the Linux flash player from Adobe from &lt;a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"&gt;here&lt;/a&gt;.  Open a terminal window and run the following commands:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;# exist firefox before running these commands
tar xvfz install_flash_player_9_linux.tar.gz
cd install_flash_player_9_linux
./flashplayer-installer
# at this point, the installer should ask you where the firefox
# directory is, it should be in /usr/lib/firefox&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Overall, the installation went well, but was time consuming.  There were some pitfalls, but they were easy to overcome.  Ubuntu runs well on my MacBook with Parallels (I'm actually blogging from it).  I'm sure it would run even better on a MacBook Pro.  I really enjoy having a complete separate environment for development.  I have complete freedom of experimenting with different things without worrying about messing up my system.  If you ever wanted to play around with Ubuntu on a Mac, Parallels is definitely the way to go.  If this works out well, I might just keep all my development stuff on a separate Parallels image.&lt;/p&gt;</description>
      <pubDate>Tue, 01 Jan 2008 23:35:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:f6f72574-8f97-4f21-91be-767b9cd8123b</guid>
      <author>Aaron Feng</author>
      <link>http://www.aaronfeng.com/articles/2008/01/01/bring-in-the-new-year-with-gutsy-gibbon-parallels-ruby-and-rails</link>
      <category>ruby</category>
      <category>mac</category>
      <category>tools</category>
    </item>
    <item>
      <title>Kernel Panic</title>
      <description>&lt;p&gt;&lt;img src="http://www.aaronfeng.com/files/2007-04-09_osx_kernel_panic.png" alt="OSX Kernel Panic"/&gt;&lt;/p&gt;

&lt;p&gt;In less than two months I managed to get a &lt;a href="http://en.wikipedia.org/wiki/Kernel_panic"&gt;kernel panic&lt;/a&gt; on my Mac.  Generally kernel panic occurs on UNIX like operating systems when it encounters an error it cannot recover from.  It is similar to the blue screen of death on Windows.  My MacBook has been intermittently shutting it's self off when I tilt it. It was annoying, but it turned right back on when I pressed the power button.  However, last week kernel panic happened when I tried to turn it back on.  No matter how many times I tried to reboot the machine, I received the same kernel panic screen.  I contacted Apple, and they could not diagnose the problem over the phone, so they told me to drop the laptop off at an Apple service center.&lt;/p&gt;

&lt;p&gt;I left my Mac at the Apple service center for two days, and they could not find any hardware related problems.  They basically told me I had to pay them money to reinstall the OS in order to fix it.  I decided to get the MaBbook back because I can handle the reinstall myself.  Since no hardware problems were found, I had to pay 48 bucks to the Apple service center for a diagnose fee.  Apparently this is standard at an Apple service center, but not at an Apple retail store, I later found out.&lt;/p&gt;

&lt;p&gt;After I got home, I decided to boot up my MacBook.  To my surprise, the kernel panic went away.  At this point, I was still not convinced it was a software related issue because the laptop still shuts it's self off if I tilt it the wrong way.  I called Apple back, and complained about the 48 bucks that I wasted.  As reimbursement, they sent me an &lt;a href="http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/wa/RSLID?mco=96190CF2&amp;amp;nplm=M9470LL%2FA"&gt;Airport Express&lt;/a&gt;.  Since my MacBook is still shutting off on its own, I will have to take it back soon.  Next time I will tale it to an Apple store, not a service center.&lt;/p&gt;</description>
      <pubDate>Tue, 10 Apr 2007 20:28:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:d515785e-9fe8-478e-9b69-78970ba6bc5d</guid>
      <author>Aaron Feng</author>
      <link>http://www.aaronfeng.com/articles/2007/04/10/kernel-panic</link>
      <category>mac</category>
    </item>
    <item>
      <title>Hello Mac</title>
      <description>&lt;p&gt;This is my new toy.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.aaronfeng.com/files/2007-02-22_macbook.jpg" alt="macbook"/&gt;&lt;/p&gt;

&lt;p&gt;My Dell laptop recently died, so I was back in the market for another laptop.  I had never owned a Mac before, but I had always wanted to.  After doing some research, the MacBook seemed to fit my needs.  &lt;/p&gt;

&lt;p&gt;After using it for a few hours, I felt right at home.  It has the best of both worlds, UNIX and Windows.  I am a big fan of UNIX-like Operating Systems, but I have not had time to play around with one for quiet some time now.  Mostly it is because I have been working in a pure Windows environment in my current project.&lt;/p&gt;

&lt;p&gt;One of the first things on my Mac checklist is to get &lt;a href="http://rubyonrails.com/"&gt;Rails&lt;/a&gt; running on my new Mac.  I found a great &lt;a href="http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx"&gt;tutorial&lt;/a&gt; on setting up a &lt;a href="http://rubyonrails.com/"&gt;Rails&lt;/a&gt; development environment.  It contained the following programs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.ruby-lang.org/en/"&gt;Ruby&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://rubyonrails.com/"&gt;Rails&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://mongrel.rubyforge.org/"&gt;Mongrel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://mysql.org/"&gt;MySQL&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The directions are explicit and easy to follow.  I would highly recommend it if you are trying to get &lt;a href="http://rubyonrails.com/"&gt;Rails&lt;/a&gt; running on your Mac.  &lt;/p&gt;

&lt;p&gt;I downloaded &lt;a href="http://macromates.com/"&gt;Textmate&lt;/a&gt; once I got all the &lt;a href="http://rubyonrails.com/"&gt;Rails&lt;/a&gt; components installed.  It just felt right to develop &lt;a href="http://rubyonrails.com/"&gt;Rails&lt;/a&gt; using &lt;a href="http://macromates.com/"&gt;Textmate&lt;/a&gt; :)  In fact, I am currently blogging using &lt;a href="http://macromates.com/"&gt;Textmate&lt;/a&gt; right now.&lt;/p&gt;

&lt;p&gt;In the past, I had a lot of problems with my Dell laptops (two to be exact).  They usually turned into paper weights after about a year.  I hope my luck will change with my new Mac.  Only time will tell.&lt;/p&gt;</description>
      <pubDate>Fri, 23 Feb 2007 22:00:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:aa278386-fcce-40ac-b6a9-242b2b1fae9d</guid>
      <author>Aaron Feng</author>
      <link>http://www.aaronfeng.com/articles/2007/02/23/hello-mac</link>
      <category>mac</category>
      <category>rails</category>
      <category>ruby</category>
      <category>subversion</category>
      <category>mysql</category>
      <category>mongrel</category>
      <category>install</category>
      <category>textmate</category>
    </item>
  </channel>
</rss>
