Growing plants is hard due to the long feedback cycle. I often cannot tell how it does until it is fatal. I planted a couple of Raspberries a few weeks ago and I took picture on 3/22.
Sunday, March 25, 2012
Monday, October 11, 2010
beautiful Gazania flowers
Gazania hasn't been my favorite flower, but the one below sunflowers has been doing great and got many flowers. I remember the flowers weren't quite beautiful, but I have to say this one got fabulous flowers and I like it now. So, what made the difference? These gazanias are in the same flower bed and the watering and sunlight are the same. Only thing is that this one is growing below sunflower section and I have bricks laid. Does this gives less water to it, and is that better?
By the way, Ricoh CX3 (see this on amazon) takes awesome macro pictures. This picture is as good as the one shot with DSLR for me.
Wednesday, May 19, 2010
African Daisy
I bought this while back and planted in my backyard. The name is African Daisy or Osteospermum. It is an annual but it may be tender perennial that it may survive over the winter. I like the unique colors of it. It is better to deadhead spent flowers. It looks like it can propergate by cutting. I should try it.
Saturday, February 27, 2010
Big pink flowers on a leafless tree - Japanese magnolia
A tree in my frontyard has flowers and I can identify it now!
The tree has large pink or purple tulip like flowers. The search keyword "early spring" helps me a lot to narrow down the candidates dramatically. This one is called "Japanese Magnolia" or Saucer Magnolia. It is called "Mokuren(モクレン)" in Japanese.It is interesting that it has lots of flowers but no leaves. I am pretty sure that it created a shade in summer because I had other flowers below and these survived well because of its shade. I should observe when this Japanese magnolia gets leaves.
Friday, February 26, 2010
Tulips emerged
The shoots of Tulips that I planted last autumn emerged from the ground.
It took months before emerging and it requires cold winter before growing. I don't remember how many of them I planted, but at least five of them have been growing pretty well. The shoots of tulips are a lot bigger than I thought. Guessing from the size of the shoots, blooming would be in early April.
Another flower
In addition to the flower I blogged yesterday, there is an another kind of flower.
It looks funny as the flower locates right above the ground-level and it looks like it doesn't have a stem. It has beautiful purple and white petals.I could find the name of the flower again with a few image searches. It is probably "Crocus Vernus". This is an early blooming flower with low maintenance needed. Good for full/part shade.
It grows from "corms". Every four years or so, split corms to propagate. The plant care seems pretty much the same as growing Muscari.
Wednesday, February 24, 2010
Blue flower with little bells - Muscari
It rains a lot in Bay area, but it is getting closer to spring. I started to see more plants are growing. I saw a few new plant in a flower bed of the backyard today. It has blue flowers which look like clusters of little blue bells.
I did an image search with [Blue flower little bells] and got "Muscari". More specifically, it looks like Muscari armeniacum and typically called as Grape Hyacinth. It is a perennial obviously as I didn't plant but it was there from last year. Originally it grows in Southeastern Europe to Caucasus. The name suggests that it was from around Armenia. It is a flowering bulb. It requires very little care. It blooms early spring and that's why I see the flower now. It grows to 6 to 8 inches tall (really?). It likes sun and is okay in partial shade.
Thursday, July 2, 2009
Set NetBeans interface back to US English
I use Mac OS X in Japanese, but I like most of my development tools run in English.
I upgraded my NetBeans today to 6.7 and it detects my OS language and NetBeans showed up in Japanese.
http://blogs.sun.com/tao/entry/set_netbeans_user_interface_language
The fix mentioned in the page above worked for me. On OS X, the netbeans.conf file is in
/Applications/NetBeans 6.7.app/Contents/Resources/NetBeans/etc/netbeans.conf
Sunday, June 14, 2009
Blue biting flower is...
I didn't know this plant's name, but it flowers now. As blue flowers with a black stem is pretty unique, I felt I can tell now. The flower looks like biting something!
With a little bit of search, I could find the name of the plant. I believe it is Salvia guaranitica.
Tuesday, June 2, 2009
Gnucash said "This account register is read-only."
When I started up GnuCash, I saw a dialog box saying "This account register is read-only".
This account may not be edited. If you want to edit transactions in this register, please open the account option and turn off the placeholder checkbox.The error message is not good because it is not obvious that what "This account" mean. A post on Gmane (originally posted comp.gnome.apps.gnucash.user newsgroup) explains it. http://article.gmane.org/gmane.comp.gnome.apps.gnucash.user/24490
Monday, March 30, 2009
superclass mismatch for class Item
I had an "superclass mismatch for class Item" when I ran rake db:migrate.
It was because I defined the same class twice. The model class is Item and I happened to have another class Item in my migration.
mir% grep -R 'class Item' . ./test/unit/item_test.rb:class ItemTest < Test::Unit::TestCase ./app/models/item.rb:class Item < ActiveRecord::Base ./db/migrate/20090325060057_item.rb:class Item < ActiveRecord::MigrationI changed the class name in 20090325060057_item.rb from Item to AlterItem, but this was not enough. This gives me rather hard to corelate error message:
undefined method `migrate' for Item(id: integer, created_at: datetime, updated_at: datetime):Class /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:1833:in `method_missing_without_paginate' /usr/lib/ruby/gems/1.8/gems/mislav-will_paginate-2.3.8/lib/will_paginate/finder.rb:170:in `method_missing'It turned out that it was caused by filename and class name mismatch. I had to change the filename to 20090325060057_alter_item.rb to match with AlterItem class name.
Decluttered My Desk
It is hard to say whether I am an organized person or not. I am fairly meticulous about details, but my desk ended up like this recently.
Originally, I was thinking of adjusting the height of the desk and considering to replace my office desk. My research was to use Flickr to get ideas by searching "office desk" tags. I came across a very clean desk with a computer.
A blog post refers another attempt: "Declutter Your Desk by Van Mardian". It looked like a doable and cheap solution to me. So, I decided to do it as my weekend project (and I forgot the original attempt of buying a new desk!).
I've purchased a peg board, cable ties, and shackles from OSH and Home Depot, and put most of the devices to the peg board. Physical work wasn't hard, but figuring out an suitable layout was. My first attempt was not optimal but I just line the devices up and it worked out okay. It has two cable taps, a cable modem, a wifi router, a network hub, a skype phone base, two external hard drives, an usb hub, and a usb audio output.
I flipped the desk back and connected a bunch of cables, and it looks quite well. The USB hub and audio jack are accessible from the front.
Most of the clutters were just needed to be cleaned up, but there were also a couple of things on the desk such as an USB audio, external hard drives, and an USB hub. They actually made the desk look cluttered even if I cleaned up. I'm satisfied with the improvement.
There are still things under the desk and it is clear that they needs to be tidied up. It sounds a lot easier task as most of the stuff has been already handled.
![]() |
| 送信者 for gacooh |
![]() |
| The cable mess |
![]() |
| 送信者 for gacooh |
![]() |
| 送信者 for gacooh |
![]() |
| 送信者 for gacooh |
![]() |
| 送信者 for gacooh |
![]() |
| 送信者 for gacooh |
Wednesday, March 25, 2009
attr_accessor is a method
Somehow I thought the action of defining a class is an declaration and doesn't execute statements, but I was wrong.
class MyClass
put "Hello world"
def MyMethod
puts "output from MyMethod"
end
end
The Ruby code above actually spits "Hello world". I tried this with Python and Python did the same.
The reason I wondered this was Ruby's attr_accessor.
class MyClass attr_accessor :a endIt looked to me like an declaration of @a to have accessors, but it isn't. attr_accessor is an method implemented in Module class and it is not a reserved word. The truth is that attr_accessor is executed when the source code is interpreted and it defines accessor methods. AH!
Saturday, March 21, 2009
Energy Saving
When I received the first PG&E bill after I moved into the current house, I was shocked with the amount. Electricity was $243.58.
I am not an avid environmentalist, but it became so clear that I wanted to save the earth, eh, $$$. And it is a good game for an engineer because it is clearly measurable.
The baseline was 34.65Kwh/day. The game was started with replacing light bulbs to compact fluorescent lamp (CFL) bulbs. The technology was far more advanced than I thought and the color is like regular light bulbs and there's even dimmer-able ones. These CFLs requires roughly 1/5 of electricity for the same brightness. The only drawback is the slow warm-up. It takes a minute or so to reach the full brightness. There are white LED lights which is even better and it only consumes a few watts, but they are still too-white, dark, and expensive.
Switching to these CFLs saved 6Kwh or so a day. The family room had eaten the most and kitchen was the next.
However, last two months or so, I couldn't bring it down further. I was wondering what was eating that much electricity. It turned out that there was lights in my backyard. Again, these were halogen lights. While it is nice to light up, I really don't see outside much at night, I just decided to turn them off completely. Result? It was great. It shelved another 3.8Kwh/day.
It actually brought the daily electricity cost by 47% to $104.79 while the electricity usage was down by 31%. The reason was electricity's heavy progressive cost structure.
Baseline usage (415.8 Kwh) @ $0.11536
101-130% (124.74 Kwh) @ $0.13115
131-200% (291.06 Kwh) @ $0.24711
200%-300% @ $0.35432
If you use more than twice as the baseline, your electricity is more than 3x expensive. Actually, the gas's cost structure is not as steep as electricity, you may want to use gas appliances over electricity ones. In my personal experience, electric heater was worse than gas furnace, and I am glad that I bought a gas dryer.
The next target is going to be lighting in bathrooms.
Monday, March 9, 2009
How to overcome the boring Internet?
I wrote a blog post on how to find interesting things on the internet while back in Japanese. My argument was "don't use sites like Digg". Following what many people like is reasonably fun, but it doen't satisfy you fully.
In the post, I said that I found it better to search on a random topic which you are interested in.
Although I said that, I sometimes see myself still visiting Digg, a Japanese social bookmark site, various news sites, and Google reader and read through all the new stuff and I was still not satisfied (this is what I said what was going to happen).
I thought about why I did this instead of doing searches. It seems that it was hard to find a good keyword to start with. It requires some brain power. Once I found A keyword, following queries are easily following, but finding the first one is actually tough.
So, I thought about how to come up with the first search keyword.
I think I reached to a conclusion for myself: "use del.icio.us".
I have been using del.icio.us to bookmark pages which I found useful. There's no single topic on my interests and my delicious bookmarks scatter across train, graphic design, programming, and bicycle.
When I need to come up with the first keyword, my past bookmarks become a good starting point. I can continue a research on the last topic. I stopped digging for some reason (felt sleepy, needed to go out), but usually not because of completely satisfying myself. The information on the Internet is bottomless.
Or, I can randomly click a tag to see what I bookmarked. It allows me to pick a path of Today's expedition. The topics are always relavent to you because all the content was prepared by yourself.
Tuesday, February 17, 2009
Rails app deployment
I have written a few Rails applications, but I couldn't have implemented anything useful for my day-to-day use. At least one of these applications I wrote seems usable, but I found Rails app deployment was the blocking factor.
I wrote a very simple app and just focused on Rails app deployment today. It turned out that there are enough things to overcome and that's why I couldn't complete my projects.
Picking a production configuration
It is nice for Rails to have easy-to-use application servers such as Mongrel or Webrick. For a low traffic site like mine, it should be okay in terms of performance. However, I have existing python CGIs and contents may not run. I need to create a hybrid envornment to serve both legacy CGIs and new Rails apps. There are a bunch of possibilities, and I picked apache + Phusion Passenger because 1) the existing site runs apache and 2) it seems to be one of the good choices in 2008-2009.Phusion Passenger installation on Gentoo Linux
Installation of Phusion Passenger was simple, but apache configuration was not. This is not Passenger's fault by the way. Passenger is an Apache loadable module. Apache needs to load it when it starts. Gentoo Linux stores module configurations in/etc/apache2/modules.d (not /etc/modules.d!). I created /etc/apache2/99_passenger_gaku_net.conf
I had a couple of erros here and here's how I debugged.
- I had wrong PassengerRuby path. Passenger didn't spit error. Just type the Ruby path and make sure it runs a Ruby interpretor.
- Use PassengerLogLevel directive for debugging. PassengerLogLevel 1
- I enabled Apache's /server-info handler by opening it up to everyone temporalily. To do this, modify /etc/apache2/modules.d/00_mod_info.conf. Then, http://www.gaku.net/server-info shows useful info on Apache, and it should have mod_passenger.c in the page when the module was properly loaded. (/server-info is turned off now).
Installing a Rails app
As I have existing content on my site, I decided to give/isbn to my test Rails app. Other URI will be served by existing configuration.
It can be achieved by adding a following line in my vhost configution in /etc/apache2/vhost.d/.
RailsBaseURI /isbnThe filesystem directory
/web/isbn needs to point the Rails app's public directory. I created a symboic link from my web directory.
My error here was using a wrong directive. There is RukeBaseURI. I needed to use RailsBaseURI.
Monday, January 5, 2009
Bay Area OSM on my Garmin 60csx
I've been using an OSM map made by cloudmead for last couple of days, but it is hard to read under the sun, because streets are rendered in light gray. I've decided to generate one.
I used the bounding box of
bbox=-122.496,37.017,-121.807,37.84297 to cover most of the San Francisco Bay area. It roughly covers San Francisco to San Jose. It doesn't cover Northern part of the Bay area as I don't go there often.
wget -O down.osm http://www.informationfreeway.org/api/0.5/map?bbox=-122.496,37.017,-121.807,37.84297The one above no longer works in 2010. Try the following one:
wget -O down.osm http://www.informationfreeway.org/api/0.6/map?bbox=-122.496,37.017,-121.807,37.84297
java -Xmx512M -jar mkgmap.jar --gmapsupp down.osmThe downloaded data was 168MB.
.img file genereated by mkgmap is just about 3MB and it is quite impressive. The time to convert was only 30 secs or so.
Saturday, December 20, 2008
portage conflicts with bash
I haven't updated Gentoo Linux for long time. When I did emerge portage, it was blocked with bash. However, the latest bash needed portage too.
Because bash and portage depends on each other, it can't be resolved in one shot. The basic strategy of solving these dependencies is to update bash to certain version, update portage and update bash to the latest.
Look at /usr/portage/app-shells/bash, I have following packages:
-rw-r--r-- 1 root root 3408 Mar 23 2006 bash-2.05b-r11.ebuild
-rw-r--r-- 1 root root 5065 Jun 25 2007 bash-3.0-r12.ebuild
-rw-r--r-- 1 root root 4613 Jun 25 2007 bash-3.0-r13.ebuild
-rw-r--r-- 1 root root 4724 Jun 25 2007 bash-3.0-r14.ebuild
-rw-r--r-- 1 root root 4601 Feb 27 2007 bash-3.1_p17.ebuild
-rw-r--r-- 1 root root 5190 Feb 9 2008 bash-3.2_p17-r1.ebuild
-rw-r--r-- 1 root root 5653 Jun 1 2008 bash-3.2_p33.ebuild
-rw-r--r-- 1 root root 6156 Aug 24 10:35 bash-3.2_p39.ebuild
-rw-r--r-- 1 root root 6156 Nov 20 12:57 bash-3.2_p48.ebuild
So, I picked 3.2_p17-r1 as the intermediate version.
# emerge -1 =bash-3.2_p17-r1
# emerge -1 portage
# emerge bash
Yay!
Saturday, November 29, 2008
I have a lighttpd + Ruby on Rails via FCGI installation and I started to see 500 - Internal Server Error from lighttpd when I accessed my rails application.
There's no error in log/fastcgi.crash.log nor log/development.log of my Rails installation. It appeared that public/dispatch.fcgi was called and failed. I put a bunch of fprintf-equivarent and found out that the line with2008-11-29 01:15:11: (log.c.75) server started 2008-11-29 01:15:22: (mod_fastcgi.c.1743) connect failed: Connection refused on unix:/tmp/ruby-railsapp.fastcgi-0 2008-11-29 01:15:22: (mod_fastcgi.c.2912) backend died; we'll disable it for 5 seconds and send the request to another backend instead: reconnects: 0 load: 1 2008-11-29 01:15:23: (mod_fastcgi.c.2471) unexpected end-of-file (perhaps the fastcgi process died): pid: 2068 socket: unix:/tmp/ruby-railsapp.fastcgi-0 2008-11-29 01:15:23: (mod_fastcgi.c.3234) child exited, pid: 2068 status: 1 2008-11-29 01:15:23: (mod_fastcgi.c.3281) response not received, request sent: 867 on socket: unix:/tmp/ruby-railsapp.fastcgi-0 for /dispatch.fcgi , closing connection
require File.dirname(__FILE__) + "/../config/environment".was the line where it failed. I needed to know how it failed, and I put code to dump the stack trace:
begin
require File.dirname(__FILE__) + "/../config/environment"
rescue Exception => exception
File.open('/tmp/a.log', 'a') do |f|
f.puts exception.class.name + ":" + exception.message
f.puts exception.backtrace.join("\n")
end
end
and it gave me some clue:
SystemExit:exit /Users/gaku/ror/iphone/public/../config/boot.rb:65:in `exit' /Users/gaku/ror/iphone/public/../config/boot.rb:65:in `load_rails_gem' /Users/gaku/ror/iphone/public/../config/boot.rb:53:in `load_initializer' /Users/gaku/ror/iphone/public/../config/boot.rb:38:in `run' /Users/gaku/ror/iphone/public/../config/boot.rb:11:in `boot!' /Users/gaku/ror/iphone/public/../config/boot.rb:109 /Users/gaku/ror/iphone/public/../config/environment.rb:11:in `require' /Users/gaku/ror/iphone/public/../config/environment.rb:11 /Users/gaku/ror/iphone/public/dispatch.fcgi:28:in `require' /Users/gaku/ror/iphone/public/dispatch.fcgi:28It failed in load_rails_gem and there was an attempt to dump error message to stderr, but FCGI didn't spit the message anywhere. The message was:
$stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v#{version} rails`, update your RAILS_GEM_VERSION settingin config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)I have rails 2.2.2 gem installed, and I updated RAILS_GEM_VERSION variable in config/environment.rb to 2.2.2. However, in fact, the code tried to run
gem 'rails', '2.2.2'and threw Gem::LoadError. I need to dig deeper. I put another stack trace code to the Gem::LoadError handler and it revealed another trace:
Gem::LoadError:Could not find RubyGem activesupport (= 2.2.2) /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:636:in `report_activate_error' /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:141:in `activate' /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:165:in `activate' /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:164:in `each' /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:164:in `activate' /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:49:in `gem' /Users/gaku/ror/iphone/public/../config/boot.rb:62:in `load_rails_gem' /Users/gaku/ror/iphone/public/../config/boot.rb:53:in `load_initializer' /Users/gaku/ror/iphone/public/../config/boot.rb:38:in `run' /Users/gaku/ror/iphone/public/../config/boot.rb:11:in `boot!' /Users/gaku/ror/iphone/public/../config/boot.rb:123 /Users/gaku/ror/iphone/public/../config/environment.rb:11:in `require' /Users/gaku/ror/iphone/public/../config/environment.rb:11 /Users/gaku/ror/iphone/public/dispatch.fcgi:28:in `require' /Users/gaku/ror/iphone/public/dispatch.fcgi:28It was not a failure to load rails 2.2.2 gem, but it failed to load underlying gem called activesupport. It says "Could not find RubyGem activesupport (= 2.2.2)". It looked to me that I also have activesupport 2.2.2 according to my gem list --local command. However, when I run gem uninstall activesupport, there's an strange error:
kvant-2% sudo gem uninstall activesupport ERROR: While executing gem ... (Gem::InstallError) Unknown gem activesupport >= 0So, I reinstalled activesupport anyway and this fixed the problem. It looks like the cause of the problem was broken activesupport gem installation. It should have happened during my upgrade of Rails from 2.1 to 2.2. I don't know how it happen though. Lessons
- lighttpd's "child exited with status 1 /Users/gaku/ror/iphone/public/dispatch.fcgi" actually means Ruby fcgi script exit with status 1. Rails framework has such code.
- Stack trace is easy and informative in Ruby.
- gem installation could be broken. gem uninstall/install may help.
Tuesday, August 21, 2007
Subscribe to:
Posts (Atom)














