Posterous
Arthur is using Posterous to post everything online. Shouldn't you?
3286618267_3db31c4cec_o_thumb
 

Arthur Chang

New pictures of my tank

My Nikon camera has finally been fixed and returned from Nikon Service.  Amazingly, it works even better than before.  I think it came with a slight defect that I didn't really notice.  Anyways, to test it all out, I took pictures of the most interesting thing at hand at the time, my 80 gallon Saltwater Reef Tank.  I just got it restocked a month or two ago, so the corals are still real small =)  The tank has been setup for a year+ now though.

 

DSC_4105

 

 

DSC_4107

 

 

DSC_4117

 

 

DSC_3936

 

 

DSC_3944

 

 

DSC_3964

 

 

DSC_3961

 

Tagged  //   photography   reef  
Posted October 22, 2009
// 1 Comment

Cryptic Repair Invoice from Nikon

A couple weeks ago I had to send in my Nikon camera for repair.  Autofocus was completely screwed up, and the shutter would get stuck halfway every 50 or so releases.  The entirety of the process, I was in the dark as to what was happening, always getting the promise that they would let me know soon.  They (Nikon) are well known for not giving any updates unless they: 1. need your money to continue, 2. are done with it and send it back with zero confirmation.

I gave up even trying to figure out what was wrong, and was in the mindset that they would hopefully fix it and would tell me what went wrong when it came back.  Well they tried, what came back was the most cryptic invoice in the world (and of course the camera body).

B2
Service Repair Rank B2
Write Up
Repair SC 201117
RPL MIRROR ANGLE
CLN IMAGE SENSOR
CDK FLASH OPERATION
CKD AUTO FOCUS OPERATION
CKD IMAGE TEST
GENERAL CHECK & CLEAN

There's all sorts of acronyms and I have no idea what they fixed or didn't fix. These guys need to learn how to be more personal in how they deal with customers a bit in their invoices. Probably 1% of all customers know what these things mean. There's no glossary either.

This is like writing in assembly (fine, maybe C) as opposed to writing clear ruby code that's literal.

What does RPL, CLN, CDK mean? Repair SC?

Here's my guesses:

RPL - Rallied People Linguine
CLN - Cleared loose nomads
CDK - Chilled duck kidney
SC - Semi Conductor

Can anyone point me to a page with the glossary or be able to shed some light?

Thanks 

Posted October 20, 2009
// 0 Comments

Relay for Life - Palo Alto 2009

Volunteering for a good cause is really the best way for anyone and everyone to make a good difference in this world.  Regardless of wealth, success, gender, age, and health, it all comes down to community and people linking up together to eventually become a big difference.

It's really up to every single participant to make it work, everyone needs to work as hard as the other, and to spread the word by brute force and eventually virally.  The concepts are not very different than how businesses try to spread the word to others, and how clients or users start taking part.

The most powerful difference between a business and a good cause, is that good causes aren't always just for the individual.  It's for someone else.  True altruism is probably impossible for human nature, but the reward of feeling good about helping and being part of a good cause is something nobody can ever feel guilty about.

Making any event or any charity successful takes as much work, if not more than any other business out there.  It's hard to bring awareness to these good causes though, as it's not high priority or on anyone's real agenda to help out and volunteer.  What does it take?

I'm starting with photography to help try to convey the message.  This weekend I'm participating in the Alzheimer's Association's Memory Walk for 2009.  Unfortunately my camera is broken =(  It'll be a good experience and hopefully the next time around I will have the opportunity to document the event again.

Below are some photos I took during the American Cancer Society's Relay for Life event in Palo Alto:

 

Survive

 

 

remember, fight back, celebrate

 

 

_DSC2092

 

 

Strong

 

 

straw

 

 

Lean

 

 

_DSC2801

Tagged  //   palo alto   photography   relayforlife  
Posted October 8, 2009
// 0 Comments

Update info on Southwest required by TSA, B.S.?

I (and others I know) have received emails from Southwest Airlines, stating that everyone is required to update their Southwest accounts with full names, date of birth, gender, and other things.

This seems totally bullshit.  Why?  This southwest account thing is totally voluntary, it's just for Southwest airlines, and I could fly southwest without a stupid account in the first place.  I just used it for rewards points.  Now TSA says it's required to put and update information there?  What's that going to do TSA?  Help you find terrorists?  Seriously now, can we stop making up random requirements to make people feel safer when they won't?

I find ideas TSA comes up with to be amazingly ridiculous.  Who is actually making these decisions?  I want to know.  If it's a group of random people who think of ideas while in their showers, that isn't going to work.

Can't we come up with something better?  Or forget it, just strip everyone down naked, have them wear a TSA issued hospital gown, and ship their packages via UPS overnight to meet them wherever they're going.  K?

Posted October 2, 2009
// 0 Comments

XML Builder Partials in Rails

The past few days I've been creating an API with Rails and found that writing xml Builder files is slightly different then writing the usual erb in views.  The biggest problem was keeping things DRY and using partials, it just doesn't work the same way.  The following attempt to render does nothing in the xml.builder file:

render :partial => 'somepartial'

The reason is because the partial will receive a new xml Builder object rather than using the one already setup.  You can do a few tricks such as passing in the xml builder object in as a local variable, but I found out that the cleanest way to do it is:

xml << render :partial => 'somepartial'

Hope that helps people looking to make partials with the XML Builder in Rails

Tagged  //   code   rails   xml  
Posted September 24, 2009
// 0 Comments

Create a simple API with Ruby on Rails

Here are the few easy steps to creating a simple API in a Ruby on Rails project.

  • Start a new rails app with the restful_authentication plugin by technoweenie: http://github.com/technoweenie/restful-authentication/
  • The restful_authentication plugin allows for user accounts, but doesn't have any API authentication built in.  If you want to make publicly available API keys for your users, you'll need to put this in so you can track API usage and deter any unauthorized use.  So assuming you have restful_authentication all setup with defaults, follow this tutorial for setting up API authentication: http://www.compulsivoco.com/2009/05/rails-api-authentication-using-restful-authentication/
  • Once you have the above api authentication applied, make sure all the actions that you want protected by the API authentication by adding a before filter:

before_filter :login_required, :only => [...array of actions to be protected...]

  • To render out xml for a certain object, you can simply use a respond_to when you're ready to render xml in the controller.

respond_to do |format|
  format.xml { render :xml => @some_object }
end

  • The above assumes you have an object that you want to return, and will dump the columns as needed.  If you want a prettier or custom return xml, I would recommend using the built in Builder that allows you to specify exactly what xml you want by creating a new view file called action_name.xml.builder and changing the respond_to line to the following:

respond_to do |format|
  format.xml
end

  • In your action_name.xml.builder, use the xml builder syntax to create your own xml file.  Here's a quick example:

xml.instruct!
xml.droplets do
  @droplets.each do |droplet|
    xml.droplet do
      xml.id droplet.id
      xml.name droplet.name
      xml.created_at droplet.created_at
    end
  end
end

  • You should test all of this using curl

http://localhost:3000/controller/action/param.xml?api_key=SOME_API_KEY

 

Tagged  //   code   rails   xml  
Posted September 19, 2009
// 0 Comments

Crack in the bridge, found only when dismantling? Doesn't that sound dangerous to you?

The Bay Bridge, here in Oakland / San Francisco, California, underwent a huge change last weekend.  They found a crack in the bridge, that was extremely dangerous, which they had to fix before continuing their planned construction.  Everything opened up only about 2 hours behind schedule.  Everyone is happy... but doesn't anyone wonder: If we only caught that crack by first dismantling the bridge, what the hell else is broken on that bridge that we can't see regularly?

The crack was reported to be "unrelated to the construction," and "the cracked eyebar by itself would have forced officials to close the bridge for repairs."  Yet they didn't see it until now.

Are people surprised that Interstate 35 / St. Paul, MN bridge collapsed from unseen damage?  Maybe, but this just gives me chills.

Read more about the bridge opening on SFGate: http://kiw.is/9g

 

UPDATE (10/27/2009): Now two high strength rods have fallen and damaged three cars.  This isn't looking good.  What's being done to make sure nothing else happens?

Read more on the SFGate article: http://kiw.is/a2

Posted September 9, 2009
// 0 Comments

Snow Leopards and Rails

My turn to put in a few notes on what I did to get Rails to work nice with my newly updated Mac OS: Snow Leopard.  I got most of my information from Riding Rails blog post here: http://weblog.rubyonrails.org/2009/8/30/upgrading-to-snow-leopard.  I would recommend reading that through, but I found a few new things along the way:

  • Save your .bash_profile and your paths before doing the upgrade to Snow Leopard, you'll need them later.
  • Backup your databases, and be ready to reload them in after this is all done since we need to reinstall mysql with the 64 bit version
  • DO NOT use the latest mysql gem 2.8.x, it doesn't work.  Use the 2.7 version instead like this:
    • sudo env ARCHFLAGS="-arch x86_64" gem install mysql --version 2.7 -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
  • You must reinstall MacPorts before running the port commands listed in the blog post, you can now grab the latest Snow Leopard binary package here
  • You will have to upgrade --force install with your MacPorts to get the libraries updated correctly.  Takes a long time!  If any fail, just try deactivating the failed one first, then uninstalling it with -f, then reinstalling it.  If it's good, you will need to restart the upgrade --force install once more.  This will help resolve the issues there.
  • Use the script they have at the bottom of the post to see which gems you want to reinstall

After a lengthy MacPorts update, reinstalling gems, figuring out that I need the mysql 2.7 gem, getting git and some other paths like mysql back into my environment, everything fired right back up.  Now I have to reload my databases and I should be good to go.

Hope you guys get your stuff working!  If anything, read the comment thread on the Riding Rails blog, that'll help a ton!

Tagged  //   code   rails   snow leopard  
Posted September 1, 2009
// 0 Comments

Sanjay Black Photons (Ocellaris x Percula)

I received a pair of clownfish today, they are both a hybrid from a captive bred brood formed between a Onyx Amphiprion Percula and a black and white Amphiprion Ocellaris pair, two totally different Amphiprion (clownfish) that are very rare in that they're completely black with white stripes.  This is a pair from them, which have a dark orange mixed with black.  These were bred by Sanjay who has done a lot of research in aquarium lighting for reef tanks, and he has dubbed them "Black Photon Clownfish".  

The male (smaller one) with a non-completed middle stripe.  The female (larger one) came with some ich, hopefully she will pull through soon.  I'm hoping my ELOS 120 tank will be a great home for these two extremely unique clownfish.  In the coming weeks I am going to try to collect a pair of naked ocellaris (no white stripes), a misbar pair (with non complete stripes), and perhaps a snowflake pair (tons of white, little orange).

Here are a few pictures of the pair in the tank:

 

_DSC3673

 

 

_DSC3571

 

 

_DSC3541

Tagged  //   photography   reef  
Posted August 27, 2009
// 0 Comments

On our way to Dog Patch Labs for #railsrumble

Woke up super early (5am) for the Rails Rumble 2009 competition.  The competition started about 12 hours ago, but we decided to get a little sleep in and start early this morning.  Here's our walk from the Embarcadero BART over to Dog Patch Labs on Pier 38 (townsend and embarcadero).  All photos taken from my iPhone and processed 2x through the Magazine filter on CameraBag.

Tagged  //   iphone   iphone photography   photography  
Posted August 22, 2009
// 0 Comments