Mar 19 2009

Google Analytics for WordPress Not Working

I just installed the Google Analytics for WordPress plugin, because it seems like everyone is doing it now and I’m missing out on something.

After installing and configuring this plugin, I went through my site and refreshed a couple pages, only to find out that the javascript needed for the analytics was not being included in the HTML as I expected. Google AnalyticsI tried to briefly search for help on this, but I didn’t find anything.

It turns out that you have to be logged out of WordPress for this to display within the code. It makes sense, you don’t want your statistics to tell you about your traffic on your own website, you want to know the stats on REAL visitors. I hope this tip helps save someone some time.




Mar 13 2009

Database Schema Information

It can be very useful to have the database table schema information available to you when you are working on a model in a Ruby on Rails application. There is a plugin available which provides the schema information in comments at the top of each model called Annotate Models Plugin.


# == Schema Information
# Schema version: 20090215021706
#
# Table name: orders
#
# id :integer(11) not null, primary key
# order_number :integer(11) default(0), not null
# created_on :datetime
# shipped_on :datetime
# order_user_id :integer(11)
# order_status_code_id :integer(11) default(1), not null
# notes :text
# referer :string(255)
# order_shipping_type_id :integer(11) default(1), not null
# product_cost :float default(0.0)
# shipping_cost :float default(0.0)
# tax :float default(0.0), not null
# auth_transaction_id :string(255)
# promotion_id :integer(11) default(0), not null
# shipping_address_id :integer(11) default(0), not null
# billing_address_id :integer(11) default(0), not null
# order_account_id :integer(11) default(0), not null
# subscription_id :integer(11)

You can install the plugin using the following command from the root of your Rails application.

script/plugin install http://repo.pragprog.com/svn/Public/plugins/annotate_models

After you are done installing the plugin, simply run the rake task by using this command:

rake annotate_models




Mar 9 2009

scrum

Okay. I’m not going to claim to be a super go-getter developer, but I like the notion of being cutting edge and able to provide the best to new clients. I also like it when the tasks I have to perform to not look too overwhelming. It appears that cutting edge developers are following a set of guidelines for project planning and execution called Scrum which is simple, flexible (or agile), and gets the job done faster and with the fastest return on investment.

Check it out and do the math in your own head. It will make sense how simple and concise this project planning technique is.


Mar 9 2009

starting over

ok. Again I’m starting over with a fresh new blog. I hope to keep this one going, never take it down, yada yada. I’ll make sure I take a database backup in the future, along with the data.

Anyway, I’m back. I’ll be blogging about anything: web development, spirituality, life in California, food, whatever.

maxwell keyes