May 16

Finding nursing homes for your elderly can be difficult.  There are not many good site out there that is easy to find by simply typing in an address.  So I decide to create one using Medicare’s free data.  It is call US Nursing Home Finder .   I think it is the best site to find a nursing  home in US.

May 13

I need to find if there are some duplicate class in the a list of jar files.  Here is what I did:

Go to the directory contains the jar files, can run this command:

find . -name “*.jar” -exec jar -tvf {} \; > list.out 2>&1

Then run:

cat list.out | grep Somepattern

May 4

I got this error when deploy and redeploy a service: java.lang.IllegalStateException: Endpoints already been registered or something like that.  Google it without much luck.  I will have to go to server/default/work directory and remove the jbossws folder and also the particular web service folder and then restart jboss.  Then the problem will go away.  JBoss sucks!

Apr 22
  1. install xcode tools from installation cd
  2. install Macports. go to:
  3. sudo port selfupdate
  4. sudo port install mysql5 +server
  5. sudo port install ruby
  6. sudo port install rb-rubygems
  7. sudo port install rb-termios
  8. sudo port install rb-mysql
  9. sudo port install subversion +tools
  10. sudo port install git-core
  11. sudo port install freetds
  12. sudo port install rb-dbi +dbd_odbc
  13.  sudo port install rb-odbc
  14. sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.sock
  15. sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
  16. sudo mysql_install_db5 –user=mysql
  17. sudo gem install -y rake
  18. sudo gem install -y rails
  19. sudo gem install -y capistrano
  20. sudo gem install -y mongrel
  21. sudo gem install -y mongrel_cluster
  22. install eclipse
  23. install Aptana plugin
  24. install Aptana Radrails plugin
Apr 17

for i in *.rb ; svn mv $i  new_dir/ ; done

Mar 20

I have two of my ruby on rails web sites running on Godaddy and for the past two days it just suddenly stopped working.  Their tech support didn’t know why and still tried to figure out.  When I first called them, one of their tech support guys blame me.  It is time to switch to other hosting company.

Feb 26

Please!  All the software developers especially Java developers.  Stop over engineering.  Stop using abstract factory when there is no need.  Stop making it configurable when it doesn’t need to be.  Make it simple.  I am reading a piece code that right now which have a class that is an abstractfactory to create another factory.  Crazy!

Jan 30

I have to say.  JRuby on Rails is very cool.  It is so easy now to deploy to Tomcat and JBoss.   I tried and did it on both server and it ran like a champ.  Here is the steps (Mac OS X):’

  1. sudo port install jruby
  2.  sudo chmod a+w /opt/local/share/java/jruby/lib/ruby/gems/ and all the directory underneath it
  3.  sudo chmod a+w /opt/local/share/java/jruby/bin
  4.  jruby -S gem install rails mongrel jdbc-mysql activerecord-jdbcmysql-adapter activerecord-jdbc-adapter jruby-openssl warbler –no-rdoc –no-ri
  5. sudo port tomcat5  (or you can install jboss.  Just download and unpack it to a directory)
  6. jruby -S rails your_rails_project
  7. cd your_rails_project
  8. generate a simple model: jruby script/generate scaffold car model:string
  9. create a development database:my_own_development in mysql
  10. change config/database.yml:
  11. development:
    adapter: jdbcmysql
    database: my_own_devevelopment
    pool: 5
    timeout: 5000
    host: localhost
    username: root
  12. jruby rake db:migrate
  13.  jruby -S warble config
  14. change config/warble.rb file:
  15.        make sure:  config.gems += ["activerecord-jdbcmysql-adapter", "jruby-openssl","activerecord-jdbc-adapter","jdbc-mysql"]  #include all the gems you need
  16.        make sure: config.webxml.rails.env = ENV['RAILS_ENV'] || ‘production’ # point to the environment you want.  By default it is production
  17. make sure you are on your rails project’s root directory
  18. jruby -S warble war
  19. that will create war file like your_rails_project.war
  20. cp your_rails_project.war to your tomcat_home/webapps directory or your jboss_home/server/default/deploy directory
  21. start tomcat or start jboss
  22. go  http://localhost:8080/your_rails_project/ to check if your project has deployed.  To see the scaffold car go http://localhost:8080/your_rails_project/cars
Jan 26

Google usually changes their logo for special days like new year, mother’s day, etc.  Today, Google missed Chinese new year.  Yahoo didn’t miss it.  Google did.  One for yahoo.  Zero for Google.  That makes me wondering.  Is Google anti-Chinese?

Dec 3

I had several interviews with in the past.  The first set of two years ago and I got all the way to the face to face interview.  I didn’t get the job but was impressed by the interview process.  They asked a lot of tough questions.  It is good to go through the process because it helps you to prepare almost any kind of interview in the future.  Today, I had a phone interview with them again.  I already got a job but I like to go though it to practice my interview skills.  I don’t think I did as well as I did last time.  I missed a couple questions.  I think being a manager last two years are making me less technical.  Anyway,  here are a list of questions Amazon guy asked me on the phone:

  1. How to you make sure a link list doesn’t have a cycle?
  2. Data structure question:  Hashtable, array and tree.
  3. Architecture:  what are the three tiers?  Answer: Presentation, Application and persistent.  How to implement a service oriented architect. Scaling, etc….

Again, it was fun to practice interview with Amazon.  I am probably not qualified for the job.

« Previous Entries Next Entries »