A Hack a Day keeps the Sickness Away - Hacking Journal [2006/02/14]
Had a good chunk of time today to hack some more on the Rails website at work. It was planned to go into a semi-public Beta state tomorrow, where we would allow a limited amount of users to start using it. But it looks like the graphics person will take awhile and then we have not had as big a push on the content side as we wanted, but the programing is stable enough to support some users.
Anyways, I implemented my first semi-recursive method today with amazing success. Using Ruby it only took me about an hour and half to implement it, test it, and take it live. It basically loops through an acts_as_tree model and will display the relationship between the nodes. This is then used for out categories so you can then see a simple GUI of the category tree for where you want to place content. Example:
main --News ----Site News ----Web News --Help ----Ruby ----Rails
I am also starting to read Martin Fowler’s book Refactoring: Improving the Design of Existing Code and have just started into the refactoring catalog. It is an amazing book; in the short time I took today to cleanup my code, I found tons of places I could do the simple refactoring and make my code more understandable. Luckily for me I found it on [Safari][] but I will defiantly be buying this as a reference later on (I think it is worth at least $100 and I have only read half of it).
Eric Davis
[Safari] :http://safari.oreilly.com
