Edwin Goei's Blog

My New Project

Tuesday Aug 12, 2008

I've been working on a new project for the past six months. It's a new web site built using Ruby on Rails that will be going public as a beta real soon now. Ruby on Rails is a webapp framework that's built on top of the Ruby scripting language so I've also been working in Ruby. It's a pretty cool language compared to others I've used. I'll write more once the project has been released to the public.

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

CommunityOne and JavaOne

Thursday Apr 24, 2008

Yes, it is that time of the year again for 2008: JavaOne and the preceeding CommunityOne. I went to CommunityOne last year and thought it was definitely worth attending and was impressed by the variety of open source projects represented. Unlike its more well-known sibling, CommunityOne is completely free. Last year they had free food, t-shirts, and limited entry into JavaOne exhibits. This year some of the presentations I see are on OpenSolaris, MySQL, Ruby, Python, NetBeans, jMaki, Glassfish, OpenOffice, and even hardware. There's lots more I haven't mentioned too.

This is the second annual CommunityOne and I believe it developed as an expanded version of NetBeans Day which always occurred on the Monday of JavaOne week. It's a great idea because there are lots of open source projects useful for developers that Sun is involved in.

I'm signed up for CommunityOne, but so far I don't have a pass to JavaOne. That's because I no longer work on a project that's directly Java-related. For the last couple months, I've been working on Project Kenai. I'll write more about Kenai later. There is supposed to be a demo at the JavaOne Pavilion. I volunteered to help demo, but I might not be able to get an exhibit pass to get in. We'll see what happens.

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Provisioning and Deploying to a VMware Fusion Virtual Machine

Sunday Mar 16, 2008

The project I work on requires me to deploy to an OpenSolaris-based machine. However, the machine is going to be moved to another location which means it could be down for a week, so I thought I would take the time to set up a virtual machine (VM) using VMware Fusion on my Mac. It seemed like a good idea, particularly since I've worked with hypervisors like Fusion in my last project. Unfortunately, the app is quite large so it did not work out too well. I started with SXDE 1/08 and after provisioning it with all the needed software and deploying the apps into glassfish, the VM ended up slowing down and its size ended up approaching 18GB! Hopefully, the next iteration of the app will be consolidating several apps into a smaller number so it might eventually work.

I intend to write more about my experience. For example, I started writing some info on how to get the latest Java Desktop System (JDS) to run in the VNC server that comes pre-installed. See this link. Thanks go to the people in the OpenSolaris forums that helped me figure it out.

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Using Mercurial on Mac OS 10.5 Leopard

Monday Jan 07, 2008

The source code management system we are using in my project is Mercurial. To learn more about using Mercurial, see the information in the "UnderstandingMercurial" and "Tutorial" guides in the "Getting Started" section on the main Mercurial page. There is also a more extensive manual available.

If you're using a Mac like I am, go to this page and look for the heading "For OS X 10.5". Download the latest Mercurial zip file, open it, and then run the installer in the new directory. Open a new Terminal window and make sure that "/usr/local/bin" is in your PATH and then verify that Mercurial runs by running "hg --version". Use the documentation mentioned above to become familiar with Mercurial. For other platforms, see other information on the Mercurial site.

When checking in code, it is useful to set your username in a ~/.hgrc file so the command does not complain. Mine is shown below. Other configuration options can also be placed in this file.

# This is a Mercurial configuration file.
[ui]
username = Edwin Goei <edwin.goei@sun.com>

A common setup is to use ssh to access a common repository. If you do not have a ~/.ssh directory, run the following command to create a key pair. Select the default location (~/.ssh/id_rsa) and use an empty passphrase.

% ssh-keygen -t rsa

Send the generated public key located in a file called ~/.ssh/id_rsa.pub or ~/id_dsa.pub to the repository administrator. They will add it to a authorized_keys file on the common repository host to grant you access.

The following shows some example commands that access a common repository.

% hg clone ssh://hgroot@santa.sfbay/hg/vapp
destination directory: vapp
no changes found
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
% cd vapp
% echo "This is a test" >> README.txt
% hg add README.txt
% hg ci -m "Initial README"
% hg push
pushing to ssh://hgroot@santa.sfbay/hg/vapp
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 2 changesets with 2 changes to 1 files

[1] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Apple 15" MacBook Pro Laptop For Sale

Thursday Dec 27, 2007

Sold -- no longer available

Condition: Almost New. Same model currently sells for $2499 + tax from Apple. (You can check for yourself by going to the Apple Store.)

Shipping: local pickup preferred. I live in downtown Mountain View and work in Menlo Park, California.

Price: $1900 cash or check with valid ID. Credit card is $60 extra for transaction fee. Priced to sell so I can enjoy the rest of my break. :-)

Specs

  • 15-inch MacBook Pro Notebook Part number: MA896LL/A
  • Intel Core 2 Duo 2.4GHz, 2GB, 160 GB disk, matte display
  • Newly pre-installed with Mac OS X 10.5 "Leopard"
  • Comes with original box with all accessories, some unopened

Why am I selling it? There is nothing wrong with it. I purchased this in August 2007, before my company gave me with a new MacBook Pro to use instead. I've only used this one for a couple months and then it sat unused. I now have time to sell it because my company shuts down over the holidays. I've erased the hard disk and pre-installed Mac OS 10.5 Leopard on it so it will behave upon power up just like you bought it new from an Apple store with the "Welcome to Leopard" setup video.

I'm a software engineer living in Silicon Valley. This is an excellent development and home computing machine with a very nicely designed user interface. It is an x86-based CPU and so you can also use it to run other operating systems such as Windows, Linux, and Solaris simultaneously using virtualization software like Parallels or VMware Fusion, which is NOT included. I used to use a PC laptop running Windows XP before and I like this machine much better as do other engineers I know who have switched to MacBook Pros as their development machines.

I posted this on eBay originally, but then decided to try craigslist because I prefer a local pickup so I don't have to mail it. The pickup location is negotiable but I live in downtown Mountain View and work in Menlo Park in Silicon Valley. I checked comparable prices and set the price to be low so I could enjoy the rest of my break :-). If you are interested, leave me a comment and I will contact you. Thanks!

[2] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Winter Break and Getting a Round Tuit

Wednesday Dec 26, 2007

Sun has a Winter Break this week and so my goal is to complete some tasks that I've been meaning to do.

One of them is selling my MacBook Pro that I bought recently. I've wanted one for a long time but I was unsure when I would get one from work. I got tired of waiting and so I bought my own personal one last August from an Apple Store. Then soon after, the work laptop arrived and so I no longer need my personal one. If you're interested, feel free to leave me a comment and I'll get back to you.

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

MacBook Pro Battery Indicator Problems

Monday Dec 24, 2007

The battery icon in the menubar of my MacBook Pro was showing a black "X" instead of the time remaining. It looks like it also prevented the battery from being charged correctly. I found this article on how to reset the System Management Controller (SMC) that fixed the problem.

[1] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Add Custom Rake Tasks to NetBeans 6 Ruby IDE

Tuesday Dec 11, 2007

As part of a demo, I wanted to deploy a Ruby on Rails application into a Rails Virtual Appliance using Capistrano. A Rails Virtual Appliance is a Virtual Machine that contains a complete stack of software from the Operating System up to Ruby on Rails itself. If you are using NetBeans 6 as your IDE, you can create a file such as $PROJECT/lib/tasks/demo.rake containing something like the following:

# Rake task to deploy to a production server for virtual appliance demo
# 2007-12-10eeg

# File that contains IP address of virtual appliance. If this file cannot
# be read, then the user will be prompted for the information.
TARGET_IP_FILE = '/ApplianceShare/ipfile.txt'

namespace :demo do
  desc 'Print the target IP address'
  task :print_target_ip do
    puts "Target host IP: #{get_target_host}"
  end

  desc 'Show the coolstack page'
  task :show_coolstack do
    sh "open http://#{get_target_host}/"
  end

  desc 'Show the main depot web application page'
  task :show_app do
    sh "open http://#{get_target_host}:8000/store/"
  end

  desc 'Deploy to production'
  task :deploy do
    target_host = get_target_host
    sh "cap -S target=#{target_host} deploy:setup"
    sh "cap -S target=#{target_host} deploy:cold"
  end

  desc 'Deploy and run the application'
  task :run => [:deploy, :show_app]
end

def get_target_host
  if File.readable?(TARGET_IP_FILE)
    f = File.new(TARGET_IP_FILE)
    line = f.readline
    host_ip = line.chomp
  else
    print "Target host: "
    line = $stdin.gets
    host_ip = line.chomp
  end
  host_ip
end

### Local Variables:
### mode: ruby
### End:

Note that the rake task uses sh to call Capistrano via the cap command to deploy the app into the production machine which in this case is a Virtual Appliance. Then, within NetBeans, you can invoke the context menu on the project node in the Projects Window and select "Run Rake Task" and navigate to the task you want to invoke. See this blog entry or wiki page for more information on NetBeans and Rake.

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Buying Current Tune at Starbuck's

Sunday Nov 18, 2007

I stopped by a Starbuck's on our way up to Oregon and did something cool. You know how they have songs playing in the background? Well now if you have an iPhone, you can go to the iTunes store and buy it using the onsite WiFi. In fact you can see what has recently played before too. I bought and downloaded a Sarah Vaughn song. It probably works with the ipod touch too. Definitely a good trend because I often want to get what's playing for instant gratification.

Update 2007-12-17: One thing I don't like about buying songs this way is that the songs currently have DRM (digital rights management) on them so you have to authorize them on a computer to play them :-(. I know the trend is toward DRM-free music. For example, Amazon now has DRM-free music downloads. The iTunes store is supposed to as well, but I haven't figured out how to search for that yet.

BTW, I'm blogging this entry from my iPhone.

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Solaris Ruby on Rails Virtual Appliance

Thursday Nov 15, 2007

From my recent entries, you may have noticed that I've been playing with Parallels and VMware Fusion recently. That's because I'm working on a new project that utilizes virtualization technology. I'm in the process of writing down some of the steps for creating a Rails Virtual Appliance for Solaris. See this page for a draft.

[1] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

My IRC Setup

Wednesday Nov 14, 2007

I use IRC (Internet Relay Chat) to work with other people on various projects. I also use IM (Instant Messaging) but unlike the common IM systems, IRC provides channels that users can join. So for example, there is a "#jmaki" channel on Freenode for people who are interested in the Jmaki Project. See a previous entry for more information about using Freenode.

I like using Chatzilla because it is cross platform and has features like "/stalk" that I use. However, it was originally a browser add-on. Well now there is a standalone version which I just installed. It's not the easiest install procedure and I also had to copy over my old preferences manually using a text editor. Look for the "prefs.js" file in your browser's profile directory and copy properties that start with "extensions.irc.". Then merge them into the new chatzilla "prefs.js" in its profile directory.

I serendipitously found a page that shows how to do the equivalent of Chatzilla's "/stalk" in various irc clients. I know other people who use X-Chat Aqua which like Chatzilla is cross platform. It might meet your needs, but I was already used to Chatzilla and didn't want to learn how to configuring it. I was also unsure if it was being maintained.

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

My Blog Has a New Theme

Wednesday Nov 14, 2007

I've been meaning to update my old theme for a long time. So this morning I started to work on it. I started with an existing shared Sun roller blogger theme and am modifying it. It's still a work in progress.

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

VMware Fusion 1.1 is Out (was: VMware Fusion 1.1 RC1 Patch Works)

Sunday Nov 11, 2007

Update: VMware Fusion 1.1 final release is out, resuming a virtual machine (VM) works but it still causes a kernel panic when I boot a VM. See this link for more info.

There are a couple bugs with VMware Fusion 1.1 Beta like flakey bridged networking and a caps lock remapping bug so I tried 1.1 RC1. However, it caused a kernel panic on my Mac :-(. Recently, someone posted a patch that fixes this bug. See these instructions on getting it to work.

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Installing SXDE on VMware Fusion 1.1 Beta

Thursday Oct 25, 2007

I recently installed Solaris Express Developer Edition (SXDE) on my Mac using VMware Fusion 1.1 Beta. It's not as straight forward as it could be so here are the details. Based on the SXDE instructions, I had to modify the default configuration for Solaris 10 to create a VM with 768MB of memory and 20GB of disk. I also had to add the line below to the ".vmx" file to get Solaris to run in 32-bit mode. See this link for details.

monitor_control.disable_longmode = 1

Installing the VMware tools enables features such as integrated mouse movement and cut and paste and its installation is documented in the VMware manual. Hopefully, the final release of Fusion will have these problems fixed. I've also installed SXDE on the latest version of Parallels 3.0 and am in the process of comparing the two of them.

[4] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Making Other Components Work in NetBean VisualWeb Pages

Friday Jul 20, 2007

A reader asks:

Im using Netbeans 5.5 for a JSF web application that is about to kick off soon… We’re using Apache Myfaces Trinidad, and want to add these components to the Netbeans palette to we can drag and drop the components as we need them. I’m not sure how this is done in a Netbeans Visual Web Application, and reading over you blog we might need a complib for this?

I've tried doing some of this in the past. (For example, see this link.) You are correct that you need to create a component library and package it up as a complib file. Unfortunately, it's not as easy as it should be and requires a major commitment if you are doing it yourself. The last time I worked in this area was with visualweb jMaki components. Project jMaki contains a rich set of components many developed from other independent projects such as Yahoo, Dojo, and Scriptaculous. Sun also has a team of engineers working on Project Woodstock. The Woodstock components are the built-in components that are part of NetBeans visualweb pages.

BTW, the most current version of NetBeans is NetBean 6 M10.

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg