Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • Fernando 12:44 pm on February 7, 2013 Permalink | Reply  

    testing p2, what else. need to figure out how to insert links

     
  • Fernando 12:15 am on November 12, 2012 Permalink | Reply  

    Test mobile photo post 

    20121112-001544.jpg

     
  • Fernando 12:51 pm on August 3, 2012 Permalink | Reply
    Tags: Fox News, Francisco Cortes, NAHJ   

    The Obvious Choice for NAHJ’s next VP of Online 

    This Saturday my four years on NAHJ’s board are about to come to a close. I have served with NAHJ’s best and brightest, the most committed and the most passionate. We accomplished much: established the VP of Online; established voting rights for the student representative, brought expenses in line with demand.

    It’s not easy. But it never has been, never will be, and frankly, for the short-term at least is only going to get tougher.

    Which is why the only obvious choice for NAHJ’s next VP of Online is Francisco Cortes.

    As outgoing VP of Online, I know that it takes more than vision. It takes resources and support. Cortes has ample supplies of both.

    NAHJ needs more than a web site. It needs a platform. Cortes has built one inside one of the largest media organizations in the world.

    The VP of Online is one of the most important and influential positions on the board.

    Francisco has carved out a voice for Latinos within Fox News at a time when our voice is most important.

    Fox News Latino  is a success. And part of an evolving investment in US Latinos by one of the largest media companies in the world.

    Francisco is the highest ranking Latino at Fox News.

    Be greedy for a moment. Think about what that means for NAHJ.

    Cortes is one of the most influential Latinos in media. He’s not one to brag, or put himself out front. His results speak for themselves.

    If we elect him, we’re not just getting a soft spoken, talented and generous journalist who is on the front lines. Through him, NAHJ gets a seat at one of the biggest tables in the game.

    It’s an obvious choice. Francisco represents the future of our organization.

    If you have voted, thank you. If you have not, consider what you can do with your voice. One minute of your time could put NAHJ inside one of the largest media companies in the world. Right now. VOTE NOW. You have until 5 p.m. PDT today to do so.

     
  • Fernando 1:07 am on April 16, 2012 Permalink | Reply
    Tags: , irb, John McCaffrey, , Terminal   

    Raghu’s Brain Buster – Code Academy homework 

     

    I’m I was stumped. I know what needs to be done but don’t know where to start. I have to add all of the elements in the shopping cart and calculate. I’m going to try to break it down to it’s smallest steps.

    I learned in reading Peter Cooper’s Beginning Ruby that I need to define the classes of products in one class Product. Then assign attributes to each of the objects within that class. I’m still fuzzy on whether I’m referring to them correctly, but I’m beginning to understand conceptually how they are related. (I think)

    All elements in the shopping cart are objects, with their own attributes, pertaining to a class that can be compiled by a method shopping cart, which in this case is an array.

    (If you’re confused at reading this, you’re not the only one. Bear with me, I’m trying to blog my way to understanding)

    So before I try to calculate, I need to break each element out. I’m going to try that now.

    11:22 pm – I’ve managed to get almost back to square one. And man am I rusty as a homework doer. I’ve got to find a way to define the attributes of each of the products in the shopping cart so I can do math. I’ve managed to define the elements in irb, and will now try to do so in textmate.

    12:05 am – So I’m trying the .each, .times and do operations with no luck. But I just tried using Peter Cooper’s example on pet classes and objects. But I’m beginning to think the answer is obvious and that with all the prep in class I should have this. Will keep digging.

    12:36 am – I finally realized it should be much simpler than I making it out to be. And that likely we have the logic, from class, that we need to solve the problem. Staring a full day tomorrow starting with class, then work, then painting and who knows what else will pop up before heading to Albuquerque, I submit and dial up Raghu’s answer sheet. And there it is, plain as day.

    The lesson(s)?

    • Pay more/better attention in class and learn to take better notes. Not just what was said, but important concepts on which to build later.
    • Read, Read, Read. This shit isn’t going to learn itself.
    • Campfire is our friend. John McCaffrey was an angel on Sunday night, answering my newbie questions.

    And now that I think about it, I’m still stumped. But I’m going to keep making my way through Peter’s book and rereading the homework until I get it. Seeing the answer it’s obvious, but I was missing the critical piece, starting with total zero and looping.

    I got this far:

    1. Long challenge: Based on the following data,
    2. write code that prints out the customer’s total, including estimated
    3. sales tax, based on the shipping address they entered.
    4. Your code should work even if the values of the data change.
    1. Your output should look like this: “Your total with tax is $4455.54.”
    2. shopping_cart = [
    3. {:name => "iPad 2", :price => 499, :quantity => 2},
    4. {:name => "iMac 27", :price => 1699, :quantity => 1},
    5. {:name => "MacBook Air 13", :price => 1299, :quantity => 1}
    6. ]
    7. sales_tax = {“IL” => 0.115, “IN” => 0.09, “MI” => 0.06, “WI” => 0.056}
    8. params = {
    9. :name => “Patrick McProgrammerson”,
    10. :address1 => “222 W. Merchandise Mart Plaza”,
    11. :address2 => “12th Floor”,
    12. :city => “Chicago”,
    13. :state => “IL”,
    14. :zip => “60654″
    15. }
    1. Now change the value of the key :state in the params hash to “WI” and run your code again.
    1. Encapsulate your code in a method if you haven’t already.
    2. The method should accept a cart, a hash containing tax rates, and an
    3. address as arguments.
    1. Now change the quantity of iMacs in the data to 3 and run your method.
    1. class Item
    2. attr_accessor :name, :price, :quantity
    3. end
    4. class Ipad2 < Item
    5. {Ipad2_name = “iPad 2″, Ipad2_price = 499}
    6. end
    7. class IMac < Item
    8. {Imac_name = “iMac 27″, Imac_price = 1699}
    9. end
    10. class Macbookair < Item
    11. {Macbookair_name = “MacBook Air 13″, Macbookair_price = 1299}
    12. end

    shopping_cart = [
    iPad2_hash = {:name => "iPad 2", :price => 499},
    iMac27_hash = {:name => "iMac 27", :price => 1699},
    Macbookair_hash = {:name => "MacBook Air 13", :price => 1299},
    ]
    shopping_cart.each do |item|
    puts item
    end

    1. iPad2 = Ipad.new
    2. => #<Ipad:0x107598c80>
    3. >> iPad2.price = 499
    4. => 499
    5. shopping_cart.each
    • - – - The last part was from irb in terminal. – - -

    And here is Raghu’s answer:

    total = 0
    shopping_cart.each do |item|
    total = total + item[:price]*item[:quantity]*(1 + sales_tax[params[:state]])
    end
    puts “Your total with tax is $#{total}.”

    1. Now change the value of the key :state in the params hash to “WI” and run your code again.

    params[:state] = “WI”

    total = 0
    shopping_cart.each do |item|
    total = total + item[:price]*item[:quantity]*(1 + sales_tax[params[:state]])
    end
    puts “Your total with tax is $#{total}.”

    1. Encapsulate your code in a method if you haven’t already.
    1. The method should accept a cart, a hash containing tax rates, and an
    2. address as arguments.

    def print_total(cart, taxes, address)

    total = 0
    cart.each do |item|
    total = total + item[:price]*item[:quantity]*(1 + taxes[address[:state]])
    end
    puts “Your total with tax is $#{total}.”
    end

    1. Now change the quantity of iMacs to 3 and run your method.

    shopping_cart[1][:quantity] = 3
    print_total(shopping_cart, sales_tax, params)

    While I still have an interminably long way to understanding the fundamentals of Ruby, and coding, I am incredibly excited to have gotten this far. I couldn’t have done so without the help of John McCaffrey, who was a patient and generous CA community member holding my hand in the Campfire chatroom when I was having rookie problems with Terminal.

     
  • Fernando 1:28 am on April 11, 2012 Permalink | Reply
    Tags: , Rails,   

    “My toast has flown from my hand And my toast has gone to the moon. But when I saw it on television, Planting our flag on Halley’s comet, More still did I want to eat it.”
     
  • Fernando 11:48 pm on April 8, 2012 Permalink | Reply
    Tags: , Ruby on Rails   

    All aboard for first day of Code Academy 

    I’ve been working on a bunch of different projects for the last 18 months but tomorrow is the beginning of chapter I’ve been trying to crack for years. We’re hours from my first day of school since I left college in 2004. I’m part of the Spring class of Code Academy, a sharp outfit breaking in the new 1871 space at Merchandise Mart. The story is a lot longer than I’ll put in this first post, but suffice it to say I’ll fill in the details as I go along.

    I just wanted to make sure that I kept my personal goal of posting once a day for the next twelve weeks. I’m going to be publishing on several sites, whether it’s at work or on the soon-to-be-revealed site of NAHJ. But I wanted to commit to publishing here as I tread down the Ruby on Rails adventure. I’m thrilled to be part of the class and watching the threads on our Google Group tells me I’m in great company.

    Some folks are incredibly bold, leaving jobs and home for twelve weeks in Chicago. I wish I was as gutsy as they are but I’m grateful I don’t have to be. I’m going to get my learn on and think big. Real big. As Daniel Burnham has been quoted as saying, ”Make no little plans. They have no magic to stir men’s blood and probably will not themselves be realized.”

    I’m getting me a real big spoon.

    But first a few props: This site is testament to the tremendous work done in beautiful Denver by Alex King‘s ninjas at Crowdfavorite. Not sure if they’ve been reading my mind or me theirs, but FavePersonal is the shit and a lot of #WP magic (that many developers would like to charge you thousands of dollars for) rolled (incredibly well and) stupid cheap (as in affordable, not bad). Go buy it for yourself now. My boss John Trainor for letting my crazy ass out of work on Monday and Wednesday mornings to go to class. And the great folks at Code Academy for giving me one of the 18 spots in the dev course. My baby for her galactic patience. Our dog for always welcoming us home. And the kids at Hoy – Chicago and vivelohoy for putting together one of the best newspapers in town and a damn fine web site to boot (We’re big in Mexico City, in case you were wondering).

     
  • Fernando 9:48 am on January 31, 2012 Permalink | Reply  

     
  • Fernando 6:34 pm on January 10, 2012 Permalink | Reply
    Tags: Batman, Framework, Hollywood, Los Angeles Times   

    A Batman moment on Hollywood Boulevard 

     

    Reader Photos: Best of Southern California Moments for 2011 – Framework – Photos and Video – Visual Storytelling from the Los Angeles Times.

     
  • Fernando 11:41 am on January 10, 2012 Permalink | Reply
    Tags: Chris Milk, Obama   

    Obama by Chris Milk 

    Photograph by Chris Milk of Obama in Montana in 2009 according to its exif data

     
  • Fernando 11:56 pm on January 4, 2012 Permalink | Reply
    Tags: , Pilsen   

    Spincycle on Cermak, our new laundromat 

    20120104-235321.jpg

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel