Brian Corrales
corralesonline.com

About Brian Corrales

For the past 10 years, I have been involved with web development and online marketing. Last year, I graduated with a Bachelor of Information Systems Management degree from Brigham Young University's Marriott School of Management. I have a background in Accounting, Marketing and Supply Chain Management. My technical background includes Database and Systems Design, Project Management, and Enterprise Architecture.

Besides developing online applications, I own and operate Wasatch Martial Arts, which specializes in quality instruction of the Korean martial art, Soo Bahk Do.



 

Rails Conference 2008

June 2nd, 2008 . by brian.corrales

This past weekend I was in Portland, Oregon attending Rails Conference 2008.  It was a great event and I learned a lot.  The event lasted from Thursday to Sunday and I was able to attend quite a few tutorials, sessions, and presentations.  There were nearly 2000 rails developers in attendance!   I was impressed with the Conference Center and the catered meals that were provided.  I thought the event was very organized.

What really stood out for me was the presentation on Rails 2.1 which was made available over the weekend.  Rails 2.1 has a lot of great new features including better caching, gem dependencies, and time zone support.  One new addition that really struck my attention was versioned migrations.  A time stamp will now be at the beginning of the migration filename.  Having version control to my migrations will save me a lot of headaches.

Now you can do this:

script/generate migration one
      create  db/migrate/20080402122512_one.rb

The number at the end is a time stamp.  You can then retrack your steps by typing:

rake db:migrate:up VERSION=20080402122512

One other cool addition is the modification to ActiveRecord.  Say you wanted to find all your blog posts.  The command would be Post.find(:all).  With Rails 2.1, we’ll be able to simply write Post.all and Post.first.  Seems pretty intuitive.

I know it’ll probably take a little bit of work to upgrade my applications, but you gotta hand it to the Rails Team.  Version 2.1 is awesome!



[?]
Share This

Jury Duty SCAM!

March 14th, 2008 . by brian.corrales

A new type of scam is running through the U.S. and people are actually falling for it.  Read below:

Ricki Brown
Control Specialist
Willingboro PDC
Ext. 2045
JURY DUTY SCAM:

This has been verified by the FBI (their link is also included below).

Please pass this on to everyone in your email address book.

It is spreading fast so be prepared should you get this call. Most of us take those summons for jury duty seriously a new and ominous kind of fraud has surfaced.
The caller claims to be a jury coordinator. If you protest that you never received a summons for jury duty, the scammer asks you for your Social Security number and date of birth so he or she can verify the information and cancel the arrest warrant.

Give out any of this information and bingo, your identity was just stolen.
The fraud has been reported so far in 11 states, including New York , Oklahoma , Florida , Illinois , Texas and Colorado .

This (swindle) is particularly insidious because they use intimidation over the phone to try to bully people into giving information by pretending they are with the court system.
The FBI and the Federal Court System have issued nationwide alerts on their web sites, warning consumers about the fraud.

Snopes site: says this is real fraud.

http://www.snopes.com/crime/fraud/juryduty.asp<http://www.snopes.com/crime/fraud/juryduty.asp>;

FBI site: warns about the fraud.

[?]
Share This

RAILS 2.0 Sessions

February 13th, 2008 . by brian.corrales

So I just updated a project to RAILS 2.0. There’s been a few stumbles on the way, but the main issue I came across was Sessions. It seems that the RAILS team has decided to move away from file-system sessions to cookie sessions. Cookies seem to be much faster than the old file system. The only draw back is that it forces you to utilize session variables as intended…sparingly. Cookies are generally limited to only 4K. There really isn’t any need for you to ever store more than this in your session anyway. It’s just not considered best-practices.

So if you are upgrading to Rails 2.0 and you get some errors, such as a 500 Error, be sure to check how you are handling sessions. Regardless, you’ll need to add the following code into your environments.rb file (don’t forget to restart your server):

config.action_controller.session = { 
  :session_key => _my_app_session, 
  :secret      => hashed_key_of_at_least_30_characters 
}

If you want to read the documentation, here’s the link: http://caboo.se/doc/classes/CGI/Session/CookieStore.html .

For a really good discussion on Sessions and RAILS, go here.

[?]
Share This

Ordering Eager-loaded Data

February 1st, 2008 . by brian.corrales

If you are using Active Record with Ruby on Rails, I’m sure you’re familiar with the :include symbol for the find method. Here’s an example where we have a category structure of Categories -> SubCategories:

@category = Category.find(params[:id], :include => [:sub_categories])

This will find the category with id = params[:id] and will eager load all of the related sub categories. This way we only need to run one query, rather than two. We could also do this

@category = Category.find(params[:id], :include => [:sub_categories, {:sub_categories => :products }])

Now we are going down another level and retrieving all products related to each sub_category. Unfortunately, there is no way to go travel further into your data model with the :includes symbol. If anyone has a good approach, I’m all ears.

The problem I’ve run into is that my Category model has has_many :sub_categories, :order => ‘rank asc’. When I include :sub_categories, Active Record does not recognize my ordering. This caused me quite a few headaches until I came across this in the docs:

” Since the eager loading pulls from multiple tables, you‘ll have to disambiguate any column references in both conditions and orders. So :order => “posts.id DESC” will work while :order => “id DESC” will not. Because eager loading generates the SELECT statement too, the :select option is ignored.” Here’s the link:

So the best approach would be @category = Category.find(params[:id], :include => [:sub_categories, {:sub_categories => :products}], :order => “categories.rank, sub_categories.rank”)

This will order your categories and sub categories. Hopefully someone finds this useful. If you have come up with a better approach, please let me know.

[?]
Share This

New Blog

January 26th, 2008 . by brian.corrales

I’ve finally decided that my blog is too disjointed. If you are interested in my martial arts related posts, please go to http://blog.wasatchmartialarts.com.

[?]
Share This

RMagick Errors with Windows

December 24th, 2007 . by brian.corrales

If you are experiencing an unusual ruby error after installing RMagick, before digging too deep, try not only rebooting your web server, but Windows itself.  That fixes a ton of possible errors that could result from a RMagick installation. The error I had was RMagick.so not found.

[?]
Share This

Star Wars Rocket Launch

December 12th, 2007 . by brian.corrales

Check this out.  A real X-Wing Fighter straight out of Star Wars has been built.  Pretty cool launch.  Not sure if I’d spend $5000 on it though…

[?]
Share This

NEW Tiger Tots Class

November 27th, 2007 . by brian.corrales

Finally, Wasatch Martial Arts will have a Tiger Tots class designed specifically for kids ages 4 to 6. It’s a fun program designed to teach young kids discipline, respect, coordination, and self confidence. The class will prepare them to enter the older kids class later on. If you would like to register your child click here.

[?]
Share This

Hu Ri - Soo Bahk Do’s Unique Use of Hip

November 17th, 2007 . by brian.corrales

I am often asked what makes Soo Bahk Do unique from other martial arts systems.  Though there are many facets of Soo Bahk Do that differentiate it from other systems, possibly the characteristic that has had more impact on the martial arts community is our unique method of hip twisting and thrusting.  Here is a small video clip of the successor of the Moo Duk Kwan founder, Hyun Chul Hwang Kwan Jang Nim as he explains the physics behind our unique use of hip:

Use of Hip

[?]
Share This

The Ryu Pa of the Moo Duk Kwan

November 10th, 2007 . by brian.corrales

Ryu Pa is a Korean term that means “a river flowing down divided”.  This is the term used for the word “style”.  The Moo Duk Kwan style was created by the late Hwang Kee.  To understand his style, it is important to understand his martial arts training.  Hwang Kee’s training can be divided into 4 specific areas.

When Hwang Kee was only 7, he witnessed a fight with a Tae Kyun master defend himself against a large group of men.  Hwang Kee was so impressed that he followed the man home and eventually asked to learn.  Hwang Kee was refused because he was too young.  Determined, Hwang Kee woud watch from a distance as the master would teach Tae Kyun.  Though he never received formal training in Tae Kyun, some considered him a master in his own right by the age of 22.

Later, Hwang Kee went to Manchuria to work on the railroad.  There he was able to train with Yang Kuk Jin, a master of the Chinese martial arts.  Here Hwang Kee received his only formal training which included Seh Bop (Postures), Bo  Bop (steps) and Ryun Bop (Conditioning).  He also trained in Dham Toi Sip E Ro (12 Step Tan Tui) and Tae Kuk Kwon (Tai Chi).

When Hwang Kee returned to Korea, he ready books on Okinawan Karate.  The exact titles are unknown.

After World War II, Hwang Kee opened a school teaching a new system that he created called Hwa Soo Do.  This style was heavily influenced by his training in Manchuria.  However, because of the Japanese Occupation of Korea, his art was not very well received.  One day, he spoke with the founders of Ji Do Kwan and Chung Do Kwan.  Chung Do Kwan was teaching Tang Soo Do, which had roots in Shotokan.  Ji Do Kwan was teaching Kong Soo Do, which had roots in Judo.  Both of these styles had many more students than the Moo Duk Kwan. After meeting these two founders, Hwang Kee decided he needed to integrate the art of “Tang Soo Do” into the Hwa Soo Do discipline.  At the time, Tang Soo Do was the only term for a “Karate-type” discipline that the public would recognize and accept because of their Japanese doctrinization during the past 50 years.  From the knowledge he had acquired from studying Japanese books, he began teaching Tang Soo Do while applying the Hwa Soo Do discipline of techniques.  This included a unique use of offensive and defensive hip movements in all hand techniques.  Kicks also had a unique way of extending the hips on all thrust kicks.  These along with other characteristics distinguished the Moo Duk Kwan system from others teaching “Tang Soo Do”.

In 1957, Hwang Kee discovered the Moo Yei Do Bo Tong Ji, the oldest Korean martial arts text known today.  Inside, he discovered a fighting art called “Soo Bahk Ki” or Soo Bahk Hee” which means hand striking techniques or dance.   He recognized the importance of “Soo Bahk” as a Korean traditional martial art and studied the book in depth.  The Moo Duk Kwan began another transformation as Hwang Kee implemented the Soo Bahk system into the Moo Duk Kwan.  This implementation has continued until the present day where the Moo Duk Kwan now practices forms taken from and based upon the teachings from the Moo Yei Do Bo Tong Ji.  In the 1990’s, the Moo Duk Kwan in the United States formally changed its name from the United States Tang Soo Do Moo Duk Kwan Federation to the United States Soo Bahk Do Moo Duk Kwan Federation.  The change of the name outwardly demonstrates the Moo Duk Kwan’s change of focus from the Tang Soo Do curriculum that had a strong base in the Okinawan Karate forms to the unique Soo Bahk Do forms created by Hwang Kee such as Chil Sung, Yuk Ro, and Hwa Sun.

The Moo Duk Kwan today teaches the combined knowledge that Hwang Kee left to his son and successor, Hwang Hyun Chul.  The system is largely influenced by his teacher in China and his findings in the Moo Yei Do Bo Tong Ji along with his unique findings on the execution of basic techniques (unique use of hip).  The “Tang Soo Do” forms are also taught, but less emphasis is placed on them today.

[?]
Share This

« Previous Entries