Skip to main content

Posts

Showing posts from June, 2017

Git damnit...

Phew...had my intro to command line and Git today. My push kept going toward a repository I hadn't directed it toward (or did, and stupidly didn't realize). After deleting and remaking everything I managed to get it to work. I'm not entirely sure I understand the upside of using Git & the terminal for pushing files - but I expect that will become more clear as I continue learning and applying my new knowledge. The satisfaction derived from being faced with an issue and solving it is immense. Indeed, this must be a required bone in the programmers body. I finished Nick Pettits' Treehouse portfolio tutorial yesterday as well, which is currently live @ www.colindimeo.com - however, all the content is placeholder with that provided in the tut. I will be updating it within the week. Look out for that! (Maybe I'll sneak a little JS in there too!)

Duh.

Well - it took me a minute, but I misunderstood that the original "end" was not to cap my "if" - I was missing the "end" cap for the "if". Problem: require 'csv' total_sales = 0 CSV.foreach('sales-data.csv', headers: true, converters: :all) do |row|   # TODO: check if category is "Music" (row[2])   # TODO: if it is music, add total_sales + the row's sales (row[6]) end puts total_sales.round(2) Solution: require 'csv' total_sales = 0 CSV.foreach('sales-data.csv', headers: true, converters: :all) do |row|   if row[2] == "Music"   total_sales = total_sales + row[6]   end end puts total_sales.round(2)

WTF?

require 'csv' total_sales = 0 CSV.foreach('sales-data.csv', headers: true, converters: :all) do |row|   # TODO: check if category is "Music" (row[2])   # TODO: if it is music, add total_sales + the row's sales (row[6]) end puts total_sales.round(2) Can't seem to get this to work...was thinking the answer would be: if row[2] == "music" total_sales = total_sales + row[6] Coffee is made, brain is fresh. I will report back.

Typing test:

Need to work on my accuracy, but I'm pleased with my WPM at the moment. typing.com is a really strong resource - I look forward to using it more regularly to hone my typing skills.

Fun in the sun:

I'm heading to Wilmington, NC tomorrow to take a few much needed days off at the beach with my lovely girlfriend, and some buddies from back home in NJ. However, before fun in the sun - I wanted to make sure I finished Jon Duckett's book on HTML & CSS. I have just completed that book (5 minutes ago) and I'm excited to start on his JS & JQ book next! Here's some screen grabs from some of the example sites I learned to build: I was really impressed with how much you could do with just a style sheet and some straight forward HTML. Granted, a lot of the looks will rely on your access to quality assets. If you were given Legos made out of dog doo, and asked to build a house, you may still be able to build a house - but it will smell like shit. See ya next week!

Regret...

Just kidding...but seriously, as I dig further into  HTML & CSS by Jon Duckett, all I can think about is how I should have stuck with this years ago when I was decking out my Myspace page...