Plasticx Blog

Capable of being shaped or formed

Tech Books I Read In 2006

Posted by Mike 12/30/2006 at 07:25PM

I read the following books in 2006. I’m writing this post to guilt myself into writing a review for each.

  • CSS: The Missing Manual (ISBN 0596526873)blog post
  • Programming Ruby: The Pragmatic Programmers’ Guide, Second Edition (ISBN: 0974514055)
  • Head First Design Patterns (ISBN: 0596007124)
    blog post
  • Rails Recipes (ISBN: 0977616606)

Posted in |

Cookbook3, Ruby on Rails Tutorial

Posted by Mike 11/12/2006 at 01:59PM

The title to this blog entry is a bit misleading. This is really my notes on the implementing Curtis Hibbs’ “Rolling with Ruby on Rails” part 1 and part 2 . This is not a tutorial in and of itself but is a supplement to Curtis’s work. There must be ways to improve my code as well, so I look forward to learning from someone’s Cookbook4. My work can be found in the cookbook3.tar.bz2 file.

Posted in , , |

Subversion + Rails In Five Minutes

Posted by Mike 11/05/2006 at 12:13PM

This is a quick set of subversion commands to create a repository for your Rails application. The repository is dedicated to your Rails app so the head of your source will be in the trunk, version releases will be in tags, and branches for you code base will be in branches.

Nicholas Evan’s Subversion In Fifteen Minutes is a good reference for quick subversion setup, what your getting here is the 5 minute version with Rails specifics. The HowtoUseRailsWithSubversion page at RubyOnRails goes into more detail about additional things to consider when sharing a Rails project across many developers (like how you might handle database.yml for example).

Posted in , , |

assert_redirected_to Expects Strings, Not Symbols and Simple Localization

Posted by Mike 10/28/2006 at 05:21PM

I’ve been in the process of refactoring a CRUD-like webapp that I had written in PHP over to the Ruby On Rails Framework. I’m almost done with the re-factor of the object model and views and started going through A Guide to Testing the Rails to learn the Rails way of unit testing to make my code even better. I was on sub-chapter 9.4 Response-Related Assertions and came upon an error in my unit test of a controller I couldn’t quite figure out. The syntax looked right, the controller logic looked right, and the test logic looked right.

This is a recreation of the error I kept getting with the assert_redirected_to test:


$ ruby test/functional/foo_controller_test.rb
Loaded suite test/functional/foo_controller_test
Started
F
Finished in 0.029546 seconds.

1) Failure:

test_invalid_language(FooControllerTest) [test/functional/foo_controller_test.rb:20]:
response is not a redirection to all of the options supplied (redirection is <{:action=>"index", :language=>"es", :controller=>"foo"}>), difference: <{:action=>:index, :controller=>"foo"}>

1 tests, 4 assertions, 1 failures, 0 errors

Posted in , , |

WP-Notable In a Typo 4.0 Theme

Posted by Mike 10/25/2006 at 11:10PM

Here are some quick notes on getting WP-Notable style book marking into the Scribbish Typo 4.0 Theme. This pattern would apply to other themes as well.

Posted in , |

Typo 4.0 + Apache2 + MySQL + Gentoo

Posted by Mike 10/24/2006 at 12:13AM

IMPORTANT!!! IMPORTANT!!! IMPORTANT!!!

This article deprecated by my Maintaining Your Own Typo 4.0.3 article.

The section in this article about the apache proxy is flawed, it doesn’t actually balance the load. There is also a better way to craft an init.d script generically for Mongrel in my new article.

I’ll leave the article in place for reference only.

IMPORTANT!!! IMPORTANT!!! IMPORTANT!!!

I’ve almost completed my Typo 4.0 + Apache2 + MySQL + Gentoo configuration. Some system administration is Gentoo flavored but I think this is a good rececipe for anyone looking to do setup of Typo 4.0 within an Apache2 instance with MySQL for the datasource.

Posted in , , |

Rails Caching Gotchas

Posted by Mike 10/18/2006 at 12:18PM

I had been experimenting with caching with an action in one of my controllers. The action was slow doing some additional sorting of results gathered from ActiveRecord. I had made sure that I had chosen the best ActiveRecord query and that I was sorting the results in an efficient Ruby way (i.e. in place), but the action was still slow.

Posted in , |


Web Statistics