This is my brain on reason.

Deaf Grandma – Ruby Code

May 18, 2008   written by Chantal
I’m working on Learn to Program by Chris Pine. This is one of the exercises mentioned in chapter 7 (chapter 6 in the online version).

Poor Grandma can’t hear very well. You really have to scream at her, but even then, she doesn’t quite hear what you’re saying. You have to be careful too because she often tries to plant sloppy, toothless Grandma kisses on you.

(more…)

99 Bottles of Beer on the Wall – Ruby Code

May 17, 2008   written by Chantal
Here is my (very simple) version of 99 Bottles of Beer on the Wall in Ruby. I the only fancy thing I am doing is “while”. I don’t like the fact that the song is duplicated to handle one bottle, so I will eventually change that. I have a couple of ideas, but I am not sure which I want to use.

(more…)

Twitter problems due to Ruby on Rails scaling?

May 15, 2008   written by Chantal
I’ve noticed that Twitter has been going down quite a bit lately. I have heard that the Twitter people are looking into switching from Ruby on Rails to something else. Since I am learning Ruby (with the intention of learning Rails as well), I am interested in knowing why Twitter is having problems with RoR.

Everything that I have read so far indicates that they are having scaling problems. They feel that you have to give Rails more and more CPU power and resources to keep it going with such a large site. I wonder how Rails compares to other frameworks in terms of how much resources it needs as the applications and databases get larger. (more…)

Maple Glazed Salmon

May 13, 2008   written by Chantal

If you can’t make this, you probably can’t read either.

1/4 c Canadian maple syrup
2 tbsp soy sauce
splash of lemon juice
1 tsp grated ginger
2 tbsp dijon mustard (or less if you want)
2 tbsp diced onion
4 salmon fillets

  1. Mix everything together except for the salmon and pour over the fish, saving a bit for later. Tip: The fish should probably be in a container when you do this.
  2. Marinate the fish for half an hour or more.
  3. Heat the oven to 400F.
  4. Bake for 15 to 20 minutes or until the salmon flakes when “forked”.
  5. Take the salmon out of the oven and pour the rest of the marinade over the fish.
  6. Done.

Lemon Garlic Tilapia

May 13, 2008   written by Chantal

I don’t often do recipes, but here goes:

2 tilapia fillets
1 tbsp butter
1 clove roasted garlic
2 tbsp lemon juice
pepper
parsley

  1. Heat the oven to 450. Spray the baking dish with non-stick spray.
  2. Put the fillets in the baking dish. Pour liquid over the fillets, and top with garlic, pepper, parsley.
  3. Bake in the oven for 15 minutes (or until the fish flakes when “forked”).
  4. Eat.

This recipe will probably work for almost any sort of fish. If you don’t like too much lemon, try 2 tbsp butter and 1 tsbp lemon instead. If you don’t like garlic, you are a freak and you should not read my blog.

WordPress 2.5.1 Upgrade = Not Fun

May 12, 2008   written by Chantal

I’m really not sure what went wrong. I did the Dreamhost upgrade to WordPress 2.5.1 and it fried my entire blog. The database was fine (along with the config file pointing to it), but none of my posts were visible. I tried several things, including deleting the entire blog directory and re-installing to no avail.

In the end, I just restored my backup of the old blog. Maybe I will try the upgrade again in the future, but I have had enough “fun” this week. Maybe I will create a dev environment to experiment with future upgrades. Though this is just a small personal blog, this experience was very frustrating and annoying.

For anyone who has a blog, make absolutely sure that you keep backups of your blog, your database and maybe even export your blog posts. If I didn’t have backups, this would likely be my “first” post.

If anyone notices anything strange, please, please leave a comment. I’ll be playing around with themes for the next while until I find something I like.

UC Berkeley Ruby on Rails 1-Day Course

May 10, 2008   written by Chantal

I found a one day Ruby on Rails course from UC Berkeley on YouTube. I haven’t watched the videos yet, but hopefully they will help improve my understanding of Ruby and Rails. With any luck, they won’t be 1 hour rickrolls.




I’m fairly certain that a short course won’t give you a full understanding of how Ruby on Rails works, but this should be a good start. To go from video to video, click the arrows at the edge of the player. There are five six videos.

Edit: The slides can be hard to see at times, so you can download the PDFs to follow along with the videos here.

Ruby Course – Lesson 1

May 6, 2008   written by Chantal

I’ve reviewed lesson 1 of Satish Talim’s Ruby course, along with Yukihiro Matsumoto’s “The Philosophy of Ruby” interview. The most difficulty I had was with the modulus operator, which I posted about yesterday. I also learned that Google Calculator is incorrect in its calculation of the number of seconds in a year! Always make sure you check, double-check and triple-check your sources when you are declaring constants in your programs.

To make sure I have a solid understanding of the fundamentals of Ruby, I am going to read Chris Pine’s “Learn to Program” within the next couple of days. It seems to be mentioned everywhere I go, so it must be good. After that, I am going to start reading “The Ruby Programming Language“, which I purchased in PDF form the other day. That should be a good start.

Before I get too tired, I am going to listen to Geoff Grosenbach’s Ruby Basics.

That’s about it for today. I’m back at work this week, so time is a bit limited.

P.S. I am really liking ScribeFire for posting blog entires within Firefox.

Technorati Tags: , ,

Happy Easter

Mar 22, 2008   written by Chantal

plagiarism |?pl?j??riz?m|noun
the practice of taking someone else’s work or ideas and passing them off as one’s own.

Origins of the name “Easter”: The name “Easter” originated with the names of an ancient Goddess and God. The Venerable Bede, (672-735 CE.) a Christian scholar, first asserted in his book De Ratione Temporum that Easter was named after Eostre (a.k.a. Eastre). She was the Great Mother Goddess of the Saxon people in Northern Europe. Similarly, the “Teutonic dawn goddess of fertility [was] known variously as Ostare, Ostara, Ostern, Eostra, Eostre, Eostur, Eastra, Eastur, Austron and Ausos.” 1 Her name was derived from the ancient word for spring: “eastre.”

Whew!

Mar 22, 2008   written by Chantal
I finally moved all of my old posts over to this blog from the other one hosted on .Mac.  There is nothing wrong with the iWeb/.Mac blog, but it’s far too simple for my liking.  Also, I don’t like the hoops I have to jump through to get my stat counter working.  The lack of plugins is also an issue.  It’s great for anyone who doesn’t want to fuss with their blog though.  Once all of the DNS changes propagate and I do some testing, I will go ahead and flip the blog link on my web page over to this site.  So I guess most people won’t even see this post for a while … So what’s new?  I’ve added a tag cloud and categories, so I no longer need two separate blogs for funny and not-funny stuff.  You can also view several videos on one page instead of drilling into each individual page.