Wednesday, December 22, 2010

Hardwood Floors - Day 2

Yesterday, we finally started installing the floor.  Still going slow, but just from the small amount we finished, I can already tell it's going to look amazing!

Drumroll, please!  Here's the very first board!



While the boys were busy installing the planks, I was out in the garage painting all these quarter round toe kicks.  I cranked up some Eminem to help me through it, but after painting 5 12ft strips, not even Eminem could keep me warm in that freezing weather.  And it seems like it's going to be even colder today!



A lot of loud sawing was heard throughout the house too.  We have to trim all the door jambs to fit the flooring...


And of course, Miss Lillerskatez (aka "Lily") wasn't too pleased with all the noise:


Here's the work in progress.  Note the skillful use of a jigsaw to fit the planks in the closet :)



By the end of the day, the closet was finished and a couple more rows were added on before we all crashed on the couch eating homemade pizza and watching "My Name is Earl".

Tuesday, December 21, 2010

Hardwood Floors - Day 1

It's so exciting to finally see some progress in the hardwood floor project.  Granted, no actually flooring has been installed yet, but here are the adventures in measuring and learning from Day 1.

First, we measured everything about eleventy billion times trying to find the center of the room.  Laser tools are fun, mmmkay!




Then we installed the underlay.  Looks like a golf course, huh?  That stuff is pretty fun to lay down because it has peel and stick tape! :D  That's the first box of Bamboo we opened!


The last thing we did was to lay down a row of planks to see how many we needed and how much trimming we're going to need to do to fit everything in the room.   Not sure if you can tell, but the first 1/3 of boards are lighter than the last 2/3.  Apparently, we were given 5 boxes of light-colored floor and 30 boxes of medium color.  It's gonna looks so cool all mixed together!


Up close, you can see how much character bamboo flooring has.  My floors are going to have personality!


Doesn't seem like we got much done, but the first day is a learning curve.  The rest should go a lot quicker.... knock on wood...

Sunday, December 19, 2010

Adventures in Preparation

As a lot of you already know, we're installing hardwood floors over the next 2 weeks.  In the past couple weeks, I've been doing a lot of cleaning and organizing.  Here's some of the fun I've had...

First, we had to clear out the dining room so we could bring all the boxes of bamboo flooring.   Why bamboo?  It's a green material since it renews about every 4 years and it's got a lot of character because of bamboo's unique rings.  That's a lot of boxes!  1000 square feet of flooring, to be exact.



Then I discovered that I could probably make an entire army of dust elephants with the amount of dust there was in places I forgot to clean.... ever.... Hey, don't judge me!



I also discovered we had more wires (or "waiiiiiires" as Lester in "Scooby Doo and the Alien Invaders" says) than a radio shack, but I found a nifty way of organizing them! :)



While I was searching for other ways to organize things, I came across this awesome Instructable on how to create your very own Hungarian Style Shelves .  I am definitely going to be doing this once the floor project is finished! (Picture below is from the Instructable)


After I finally got the office all cleaned out, I started on my bedroom.  I got rid of so many clothes.  This closet used to be full of shoes and clothes and all those hangers were recently separated from their beloved shirts.


Next, I'll be going to Goodwill to get rid of all those clothes.  I've already sold several things on Craigslist, such as a Lay-Z-Boy, some fish tanks, headboard & footboard, and a cat gate that does not work with my cats. 

And here we are... The first strip of carpeting removed!  I can't wait to see how the new floors are going to look!  Stay tuned....



Saturday, April 24, 2010

Using has_many :through for a Triple Join

I'm in the process of coding a Rails program and came across a situation where I need to define relationships between three tables that have one overall join table. I looked for more than an hour to find a good example on the internet and never found one that fully explained what I needed. Finally, I was able to piece together a couple snippets from different places.

Since I had such a hard time finding what I needed, I've decided to write up my problem and my solution in detail in hopes that it will help someone else out there who's looking for the same thing I did. I apologize in advance that I can't remember where I got some of the information, but I'll try to give credit if I can.


The Problem
I want to create the following tables and set up the relationships in Rails:
( ... ~ more data in the table)

people
id
name
...
properties
id
name
...
property_types
id
name
...
people_properties
person_id
property_id
property_type_id


Does Your Data Fit?
Think about the relationships like so:

 A  belongs to 0 or more  B  and  B  has 0 or more  A  with  C .

Therefore, my example looks like:

A property belongs to 0 or more people and a person has 0 or more properties with a property type.

If your data fits the general formula, then this is the solution you're looking for.



Creating the Scaffolds/Models in Rails
Depending on how your program is set up, you'll either generate a scaffold or make it simpler with just generating the model.  For this exercise, I'll build scaffolds for all the tables and a model for the join table.  The '...' indicate that you can add more columns to the tables if you'd like.

ruby script/generate scaffold person name:string ...

ruby script/generate scaffold property name:string ...

ruby script/generate scaffold property_type name:string ...

ruby script/generate model people_property person_id:integer property_id:integer property_type_id:integer

At this point, you can open the migration files for any of the models above and include any additional information such as creating an index for the people_properties join table.  You can probably set :id => false for the join table since there will be no need for rails to look at ids for the join table.


Creating the Relationships

The has_and_belongs_to_many method won't work for this scenario (and most rails programmers seem to dislike the HABTM method), so we're going to use has_many, belongs_to and has_many :through methods to set up our relationships.

Using the generic formula from above, think about setting up your relationships like so:

A has many Joined elements.
A has many B through the Joined elements.

B has many Joined elements.
B has many A through the Joined elements.

C has many Joined elements.

Joined elements belong to A.
Joined elements belong to B.
Joined elements belong to C.

Using my example data of People, Properties, Property Types, and People's Properties (a.k.a Joined elements), each model file should look like:

class Person < ActiveRecord::Base
has_many :people_properties
has_many :properties, through => :people_properties
end

class Property < ActiveRecord::Base
has_many :people_properties
has_many :people, through => :people_properties
end

class PropertyType < ActiveRecord::Base
has_many :people_properties
end

class PeopleProperty < ActiveRecord::Base
belongs_to :person
belongs_to :property
belongs_to :property_type
end


Putting It All Together
Just type rake db:migrate and you should be good to go!


Sources
Triple join in Ruby on Rails [Stack Overflow]
Do I need to manually create a migration for a HABTM join table? [Stack Overflow]
Same model, multiple has_many :through? [Rails Forum]
has_and_belongs_to_many in Rails [Stack Overflow]

Disclaimer
I'm a Rails newbie and might have made some mistakes or provided a solution that might be overkill.  All I know is after searching for awhile, this is what I finally came up with that worked for me.  If you have any suggestions for improvements, please let me know.

Saturday, February 6, 2010

Fun Stuff I Got For My Birthday!

First on the list, to enhance my Dragon Age: Origins gameplay, I got the two downloadable content packages: Warden's Keep and Return to Ostagar.  I've played the game for about 76 hours so far.  I'm definitely one of those completionist types who explores every little detail of everything.  Since I'm about 2 major quests from the end, it's nice to have something extra to do.  Then it's on to the expansion pack in March :)  After that, Mass Effect, here I come!

 
When I'm not gaming, I should probably do some working out on my own in addition to the Tae Kwon Do.  I have the original Core Performance book which is really awesome.  Now I've got the Women's edition to round it out.  Mark Verstegen's program is really great and I highly recommend it to anyone at any fitness level.  He concentrates on working your core muscles and using multi-joint exercises (which more resemble everyday life movement than single-joint exercises most people usually do).  He also incorporates active stretching and active resting.  Very sound program and great for getting in shape.


Then there's these lovely gems.  Cookbooks for bread, bento and yummy vegetarian meals!  I can't wait to try stuff out of all of these.  I'm so excited!

 

(As opposed to the Unconscious Cook or the Comatose Cook.  Both sure to come out soon.)



And my favorite one so far!!!!
("Kawaii" means "cute" and "Bento" means "Lunchbox" in Japanese)


Last but not least, I got a nice little political humor book by H.L. Mencken titled Notes on Democracy.  The back of the book reads:
Wars for "freedom."  Fundamentalists intent on banishing Darwin from the classroom.  Intrusive laws.  H.L. Mencken wrote Notes on Democracy over 80 years ago.  His era, the years of World War I, Prohibition and the Scopes Trial, is strikingly like today.  Dissident Books reintroduces this gem of cynicism and clear-thinking to a new generation.  Don't even think about voting until you read this book!

Thursday, February 4, 2010

What's Cookin': Breads and Snacks!

Even though I haven't been posting recipes lately, I've definitely still been making them!  I have several delicious recipes to share with you today.  Plus more to come tomorrow :)


First on the list are two snack recipes: No-Bake Almond-Oat Energy Bites and Chewy Granola Bars.  I made these to have something handy around the house I could eat between meals.  Both these recipes are also great for wrapping up and carrying on-the-go in case you get hungry when you're out and about.  They are both from vegetariantimes.com, are super easy to make, and incorporate delicious earthy-tasting almond butter.  While they are high in calories for a serving size, they're definitely very tasty and filling, making them the perfect between-meals snack.  The only drawback to the energy bites is the necessity for a grinder or food processor.  Neither are vegan or gluten-free, but I'm sure substitutions could be made.  I give both recipes 4 stars.


Next on the list are several breads.  All were very easy to make and delicious! I found this Pita Bread recipe on Food Network's website and I liked it so much, I've made it twice in the last 2 weeks.  It takes several hours, but all the steps are really easy.  I was skeptical about the pitas "ballooning" but sure enough, they did!  It was awesome to see and it has to be the best pita bread I've ever tasted in my life.  I will never buy pita at the store again.  Definitely 5-stars!




I planned a dinner party to celebrate Imbolc and decided on this recipe for Honey Wheat Braided Bread to use during the dinner.  I had a lot of fun making this bread because you get to actually braid it!  While the recipe called for the braided loaves to be wrapped around themselves, I thought they looked great flat.  I also only had black sesame seeds on hand instead of regular ones, but I have to say, I think the finished bread looks marvelous with the black ones.




We've been making homemade pizza for awhile now.  Usually, we buy pre-made pizza dough already rolled out and ready to decorate.  But we decided to seek out a whole-wheat dough option we could make in the bread maker.  I searched the nets and found Bread Machine Pizza Dough with Whole Wheat Flour.  Very easy to make, just dump the ingredients in your bread machine, push the dough cycle, and 2 hours later, you're ready to make yummy pizza!  We opted for cheese pizza with garlic tomato sauce.  The crust came out crunchy on the outside and chewy in the center.  Just perfect :)


No-Bake Almond-Oat Energy Bites ★★★★
Chewy Granola Bars ★★★★
Pita Bread (V) ★★★★★
Honey Wheat Braided Bread ★★★★
Bread Machine Pizza Dough with Whole Wheat Flour (V)★★★★★
V = Vegan, GF = Gluten-free

Saturday, January 23, 2010

Avatar discussions... again? No, it's about the responses it's elicited.


I'm on an email list for a Naturalistic Paganism group and there's been a lot of discussion about the movie Avatar.  I would say that pretty much all of it has been positive since Avatar portrays a story about a nature-based civilization.  However, an email came through today in response to another member's email defending the nature-based side of the movie against the "small (but vitriolic) backlash against Avatar by fundamentalist Christians".  The response to his email was, in short, to say that participating in these types of arguments is a "waste of time" and "all the brou-ha-ha about the movie has made [her] ambivalent feelings about going to see it in the first place swing right on over to the side of 'now I know for sure I don't want to see it.'"

I decided to respond to her notion that Avatar (and possibly other movies by her implications) is "just a movie" and people like the original poster and the fundamentalist Christians should "get over it".  I also thought my response was meaningful enough to me to share it with others:

I think one of the greatest things about humans is that we do find deeper meanings in movies (and other works of art) and are willing to discuss them.  And yes, sometimes argue about them.  By finding deeper meaning in things, it allows us to develop and strengthen meaning in our lives or at least serve as parables to help us understand things around us.  You state that you're not making a commentary on others' likes and dislikes, but your very email makes a commentary on those that choose to participate in these types of discussions (argument or otherwise).  Some people do feel strongly enough to respond in a way that you may feel is arguing, but that's their choice and they may find meaning in it that you don't.  It's unfortunate that you've chosen to allow the "brou-ha-ha" to influence your choice to see Avatar (and probably other movies in the past).  Without seeing it, it would be difficult for you to understand where [the original poster] and others are coming from.

Just like the point [the poster] made in his original email: without suffering and death in the world, it would be hard to distinguish what makes things wonderful.   I think the same thing applies to discussing differing viewpoints in art and film.  I feel discourse between those around me helps me to find a deeper appreciation for those works.  Granted, I usually find my own meaning, but as I listen to or read what others have to say (whether I agree with them or not), I find it helps me to strengthen and refine my own viewpoints about the movie and sometimes about my own faith and understanding of the world.  Avatar happens to one of those movies that does make commentary on many religious and political levels and that's why there is so much discussion about it.  It would be remiss for you to say that it doesn't make those kind of statements since you have never watched it.

I do agree that Avatar does have a common story with a common theme underneath all the glamor, but if you look at lot of art and film in this world, they would probably fall into the category of "common story/common theme" as well.  What makes a movie that tells a common story great, is how much it's able to touch the people who watch it.  How much it's able to get people thinking and talking and yes, even arguing.  Just because something has a common theme, doesn't mean people can't take significant meaning from it.  Go back to Winnie the Pooh or Aesop's Fables, for example.  Those are common stories with common themes, but there's so much meaning in them.  I would never consider them "just books".

These discussions aren't about coming out as winners in the end. You're right, no one does come out as a winner.  But no one comes out as a loser either.  It's all a matter of perspective and you take from it what you will.  In your case, you've chosen to forgo watching the movie altogether.  And that's your choice.  And you feel that taking part in these discussions and arguments is a waste of time.  And that, too, is your choice.  But please respect those who do feel it's worth their time to participate and recognize that even though you may not get something out of it, others will.
Thanks for taking the time to read it. Please tell me what you think.

Friday, January 15, 2010

Who says vegetarians can't make a good hash?

Last night, we made "Sam's Truck Stop Hash" topped with "Red Onion-Green Apple Marmalade", both recipes from The Vegetarian Meat and Potatoes Cookbook.  The hash, made with Boca Meat Crumbles and lots of potatoes, was warm and hearty and fit right in with the title of the cookbook.  It definitely brought back a little bit of childhood for me when I tasted it.  We topped it with the marmalade, which was tasty, but not exactly up my alley.  The recipe tells you to use ketchup instead if you want it "truck-stop style".  Perhaps, I will try that today when I have it for lunch.  Both recipes can be made vegan and gluten-free, depending on the meat substitute you choose.



As far as ratings:

"Sam's Truck Stop Hash" ★★★★★

"Red Onion-Green Apple Marmalade" ★★★

Thursday, January 14, 2010

Sweet Potatoes, Apples and Avocado. Who knew it would taste so good?



Well, according to Elwood J. Blues, "Just about every Tex-Mex chef in the world, ever?"  And he's probably right!  But this is the first recipe I've ever made, let alone tasted that combined sweet potatoes, apples, avocados, lime juice, corn, onion, toasted pumpkin seeds, olive oil and cilantro.  I snagged this recipe from Vegetarian Times and it was delicious.  The flavors mixed really well together, a combination of sweet and tangy.  And the apple and pumpkin seeds gave it a very nice crunchy texture.  The dish was very easy to make and took less than 20 minutes total.  I put a scoop of it over some mixed baby greens and had some homemade pumpernickel on the side.  While I ate it as a main dish, it would probably serve best as a side dish, since it wasn't very filling.  It's also gluten-free and vegan.  I give it 4 out of 5 spoons.

Monday, January 11, 2010

What's Cookin: Yo Cheese, Vegetarian Gumbo and "Chicken" Salad

This past week was quite an adventure in cooking up new things.  I made three new recipes and all were delightfully good for various reasons.  Plus, I'm now 3 new recipes closer to my goal of 24 for the year for a total of 4 so far.  And it's only been 11 days!


Yo Cheese

Yo? Cheese? You ask?  It's actually not cheese, but yogurt without the whey.   It's quite easy to make and it's great for a cream cheese substitute or diluting down mayonnaise in recipes to reduce the calorie count.  All you need to make it is the following:
Directions:
  • Line your strainer with the a double-layer of cheesecloth
  • Pour your yogurt in the middle of the strainer and place in a large bowl
  • Place the bowl in the fridge for 24-36 hours, pouring away the whey every so often (before it touches the bottom of the strainer)
  • Put Yo Cheese in a container and enjoy!
The texture of the Yo Cheese is thick and creamy and it's virtually calorie-less!  I even used it my "Chicken" Salad recipe featured below.  I give this recipe 5 out 5 spoons!

1Walmart does not sell cheesecloth as I found out one day after asking 4 employees there.  Not one of them even knew what cheesecloth was.  I also wouldn't get it at Target since they sell it for around $10 a package.  You can get it at any health food store for less than $3-4 a package.


Vegetarian Gumbo

I was searching the recipe archives at vegetariantimes.com for a vegetable stew I could make that would use up all the random veggies I had in my fridge.  I happened across their Vegetarian Gumbo and thought it would be perfect.  I've never had gumbo before and since you can pretty much put whatever you want in it, it was a good choice for this week.  The recipe calls for parsnips, but I used zucchini instead.   The directions asked you to cook the roux (flour and oil mixture) on high for 10 minutes until a dark caramel color.  However, I found after about 2 minutes on high heat, it turned fairly dark.  I ended up turning it down to a little over medium and only cooked it for 5 minutes before I started the next step.  I believe I got the roux too dark, but the dish still tasted great.  And it was even better the next day as most stews are.  I also stewed it in the crockpot for about 8 hours rather than on the stove.  The picture definitely doesn't do the gumbo justice, but I included it anyway.  I give this recipe 4 out 5 spoons.


Quorn "Chicken" Salad

I might be vegetarian, but I still love chicken salad sandwiches.  I look for ways to replace the chicken with something that's not only good, but has a good texture.  The perfect substitute are Quorn Chik'n Tenders.  Quorn products are soy-free meat substitutes made out of mycoprotein.  They have a great taste and texture.  So this week, I made "chicken" salad for the first time and used the Chik'n tenders.  I adapted a recipe out of Cooking Light's 5-Star Recipes and made the best vegetarian "chicken" salad I've ever had.  I give this recipe 5 out of 5 spoons and I've included it below:

  • 1/3 cup diced celery
  • 1/4 cup finely chopped green onions
  • 2 Tbsp mayonnaise
  • 1/4 cup Yo Cheese (see above)
  • 1 Tbsp fresh lemon juice
  • 1/2 tsp salt
  • 1/2 tsp dried basil
  • 2 cups Quorn Chik'n Tenders (cooked according to package)
Mix all the ingredients together and chill!  Yields 3-4 1/2c servings.

Tuesday, January 5, 2010

Week in Review: Movies and TV Shows

Here's my weekly wrap-up of the movies and TV shows I watched.  Definitely a variety this week from campy to surreal to just plain painful to watch.



First on the list is Teeth.  This movie is a independent film directed by Mitchell Lichtenstein.  The main character, Dawn, discovers she has the best defense against rape: a toothed vagina.  Vagina dentata, as it's known in mythos, makes for an interesting plot device which lends to the film's campy black humor and shocking horror.  Sprinkle in a devout abstinence program and a nuclear power plant and you've got yourself an interesting film.  What I liked about this film was that it was that the horror was more startling and disturbing than gory (though it had plenty of gore for the audience, especially if you're a guy).  Beware, there are lots of penises in this movie...not necessarily...er...attached.  I give it 4 out of 5 stars. 



The next film I'd like to share with you is called Ink.  The descriptions on Netflix don't quite capture what this movie is like.  The site describes the movie as a story of a young girl, Emma, who was spirited away into dreamland while her body lay comatose in the world of the living.  Forces of good and evil are fighting over her, while her distant father sits helpless by her side.  Watching Ink is like being in a lucid dream for 106 minutes.  There are moments where you know you're dreaming and other moments you are so sure they're real, but they end up being fantasy.  The imagery in this movie is delightful yet dark.  I give it 4 out 5 stars.



Obsessed is your typical stalker movie with all the appropriate tropes.  You could probably look at this film as Fatal Attraction-lite.  The film stars Beyoncé Knowles and Ali Larter (Heroes and Jay and Silent Bob Strike Back).  Lisa (Ali Larter) gets a temp job as a secretary where she immediately and unabashedly becomes smitten with Derek (Knowles' husband).  Obsession ensues and you've got your typical stalker-movie plot.  I actually liked this movie because stalkers and serial killers fascinate me.  It was quite interesting to see how Lisa developed her "relationship" with Derek in her mind, convincing herself it was real.  One warning though: Knowles is a terrible actress.  I give this movies 3 out 5 stars.



Speaking of trope-filled movies... Here we have Serendipity.  It's your typical romantic comedy.  The plot is cutesy but unrealistic in which a couple meet and instantly hit it off, but leave it to fate to hopefully bring them back together again several years later.  Which, of course, happens else you wouldn't have a movie.  I feel sorry for John Cusack, who I think is a great actor, but he seems perpetually stuck in romantic comedies.  I didn't hate the movie, but my cynical side had to dock it several stars.  Or maybe I just don't like romantic comedies?  I give it 2 out of 5 stars.




I consider Law and Order: Special Victims Unit to be one of my comfort shows.  You know how you have comfort food?  I have comfort shows too.  When all other movies and shows fail to nab my interest, this is one of those shows I'm always in the mood to watch.  It's hard for me to rate each season individually since the shows all run together in my mind, but even after eight seasons, the writing and acting is still top notch.  My only complaints come from a political and philosophical stand-point with some of their shady oversights with respect to civil liberties.  Plus they always seem to ignore the most level-headed of all the characters, Dr. Huang the psychiatrist.  He almost always hits the nail on the head and rarely judges the victims or perpetrators.  The rest of the cast is very judgmental even against things that aren't against the law.  That's a very frustrating aspect of the show for me.  However, I still consider it one of my comfort shows.  I give season eight 4 out of 5 stars.



This is the movie I was talking about that was painful to watch.  You thought I meant Teeth?  No.  I meant 2012: Doomsday.  I mistakenly thought it was Emmerich's 2012.  Boy was I disappointed.  The plot of this movie involves the Mayan-predicted doomsday about to destroy the world as we know it (cue REM).  Any fan of  the apocalyptic genre (of which I am one) would think it would be a decent story, even if it was low budget.  But you would soon discover you were sadly mistaken.  First of all, the special effects are laughable.  Literally.  Secondly, the acting for the most part is sub-par even at it's best.  And thirdly, Mayan mythos gets trumped by a Christian agenda.  I find that incredibly disrespectful to Mayan history.  Not to mention, all the deaths are of the ethnic actors (save one) and all the white actors miraculously survive.  I give this movie 1 out of 5 stars.  If Netflix let me give 0 stars, I would have.


Finally, on my list of movies this week, I present to you Flatliners.  This movie was released in 1990 and I found it fun to see some top actors of the time in their prime again.  The story involves five medical school students playing with life and death.  Headed by Nelson (Keifer Sutherland), the students would take turns allowing the others to literally kill them for a small amount of time, then resuscitate them.  The point?  To find out if there really was some truth to near-death experiences and see what was on the other side.  However, the students quickly find themselves facing some of their biggest fears.  The movie also stars Kevin Bacon, but this was before his gratuitous penis shot phase.  I give this movie 4 out of 5 stars.

Friday, January 1, 2010

Dancin' John: New South Black-Eyed Peas and Rice


It's traditional to eat black-eyed peas on New Year's Day as it's thought to bring prosperity for the upcoming year.  This year, I chose a recipe from Crescent Dragonwagon's Passionate Vegetarian called 'Dancin' John: New South Black-eyed Peas and Rice'.  In the south, black-eyed peas are traditionally cooked with some sort of pork, giving it a smokey flavor.  Since my household is vegetarian, we opted to leave out the pork and instead use chipotle chiles recommended by the recipe to give it that smokey flavor.  It takes a few hours to make, but the result is wonderful, hearty and warm.  Just perfect for a cold New Year's day.  Hopefully it will be perfect for ushering in a year of prosperity too!

I give this recipe 4/5 stars.  This recipe is also gluten-free and dairy-free.