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.
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!
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):’
- sudo port install jruby
- sudo chmod a+w /opt/local/share/java/jruby/lib/ruby/gems/ and all the directory underneath it
- sudo chmod a+w /opt/local/share/java/jruby/bin
- jruby -S gem install rails mongrel jdbc-mysql activerecord-jdbcmysql-adapter activerecord-jdbc-adapter jruby-openssl warbler –no-rdoc –no-ri
- sudo port tomcat5 (or you can install jboss. Just download and unpack it to a directory)
- jruby -S rails your_rails_project
- cd your_rails_project
- generate a simple model: jruby script/generate scaffold car model:string
- create a development database:my_own_development in mysql
- change config/database.yml:
- development:
adapter: jdbcmysql
database: my_own_devevelopment
pool: 5
timeout: 5000
host: localhost
username: root
password: - jruby rake db:migrate
- jruby -S warble config
- change config/warble.rb file:
- make sure: config.gems += [”activerecord-jdbcmysql-adapter”, “jruby-openssl”,”activerecord-jdbc-adapter”,”jdbc-mysql”] #include all the gems you need
- make sure: config.webxml.rails.env = ENV[’RAILS_ENV’] || ‘production’ # point to the environment you want. By default it is production
- make sure you are on your rails project’s root directory
- jruby -S warble war
- that will create war file like your_rails_project.war
- cp your_rails_project.war to your tomcat_home/webapps directory or your jboss_home/server/default/deploy directory
- start tomcat or start jboss
- 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
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?
My time at this recent startup company will soon over. We had the best people with lot of money and trying to change the health care industry using latest web 2.0 technologies and features. However, we always been lacking is a clear vision and business model. After close to 200 millions and many layoff later, the company is sold to another one for probably 25 cents on the dollars with the hope that the combined company will have a better future. The final business model coming down to CPM (ads model). The company is no longer a health company but a content company. So in the end, it is about money. If you don’t have a business model to make money, you won’t last no matter how many smart people you have and how much money you have. I never regret that I worked for this company. In the end, I have learned a lot. The journey was wonderful no matter what the destination is.
I just read this article http://www.nytimes.com/2008/12/24/opinion/24friedman.html?_r=1 from NY times. It talks about how we as a nation has fallen behind so much. We are all GM. It is so true. We should admit that we are in crisis, not just financial crisis but a intellectual and behavioral crisis. We wasted so much energy and investments on the wrong priority. It is time to change our priority and invest in the right priority. We all need to rethink and reinvent ourselves.
I had several interviews with Amazon.com 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:
- How to you make sure a link list doesn’t have a cycle?
- Data structure question: Hashtable, array and tree.
- 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.
Yeah, it is going to painful to a lot of workers and our pride. But both the unions and executives are to be blamed for not make the right choices and sacrifice earlier to save the industry. So let if fail and then other people to rebuild the industry from ground up. Meanwhile, use the bail out money to paid for unemployment and retraining for US autoworkers.
“If there is anyone out there who still doubts that America is a place where all things are possible; who still wonders if the dream of our founders is alive in our time; who still questions the power of our democracy, tonight is your answer.” “It’s the answer told by lines that stretched around schools and churches in numbers this nation has never seen; by people who waited three hours and four hours, many for the very first time in their lives, because they believed that this time must be different; that their voice could be that difference.”It’s the answer spoken by young and old, rich and poor, Democrat and Republican, black, white, Latino, Asian, Native American, gay, straight, disabled and not disabled - Americans who sent a message to the world that we have never been a collection of Red States and Blue States: we are, and always will be, the United States of America.”