January 31 2017
- Completed Ruby Building Blocks project
- Caesar Cipher
- Stock picker
- Substring function
dictionary = ["below","down","go","going","horn","how","howdy","it","i","low","own","part","partner","sit"]
def substrings(string, dictionary)
strings = Hash.new(0)
dictionary.each do |word|
if string.include?word
strings[word] = string.scan(word).length
end
end
return strings
end
The Odin Project-Blog Post 3
January 30 2017
Week 3 - Course 1 Wrap-Up
Test Driven Development Ruby “Project”
I hesitate to call this assignment a project because, although it is on my GitHub, it wasn’t necessarily building or creating anything. However, it was a great lesson in TDD and some valuable practice with the Ruby language. The tasks started off simple, quickly gained complexity, and a few I had such a hard time figuring out that I peeked at other student solutions for help. But all in all, it was another positive experience, and I look forward to working with Ruby further in the next section.
Ruby on Rails Blog App
The next, and final, project in the Web Development 101 course was a blog app using Ruby on Rails. Unlike the other projects where TOP gave us no help at all, this assignment was following a tutorial step for step. Yet somehow it still proved difficult. I’m chalking that up to the level of inexperience I have with the Rails framework and building an app from scratch. Everything that this project had us do was so new and complex that I’m both intimidated and excited for what the rest of the curriculum has in store. Throughout the instructions on the site, it kept reassuring the reader (me) not to worry about having no clue what’s happening because later in our learning this will all seem simple. Right now, I can’t imagine that, but the idea of that feeling is so empowering, and it is motivating me to keep going.
Everything Else
Aside from those two projects, there were an assortment of readings and videos to wrap up the course. Among them, I learned a bit about databases (SQL), and how relational databases would come in handy for my app. There were a few readings on the difference between the Cloud and Software as a Service. I skimmed the sections on Security and licenses, FTP basics, and some interesting posts on principles of good programming.
Looking ahead to this week: it looks like I will be taking a deeper dive into the Ruby programming language and possibly building some portfolio-level projects.
January 26-28 2017
- Worked on and completed Ruby on Rails blog app project
- GitHub
- Finished Additional Important Topics and Tying It All Together sections in Web Developement 101
January 25 2017
January 23-24 2017
- TOP Blog Post #2
- Updated Weekly Goals
- Completed Ruby testing project
- Completed Khan Academy tutorial on SQL and read about relational databases
- Read this article on Ruby on Rails
- Read chapter 1 of Hartl's Rails book and created first rails app
The Odin Project-Blog Post 2
January 23 2017
Week 2 - Etch-a-Sketch and Learning Ruby
Etch-a-Sketch
I began week 2 applying my jQuery/JavaScript to a neat little etch-a-sketch project. It was the first time in my learning that I was able to combine code with markup, and the sense of achievement I felt when I got it to work was even more rewarding than the google page. The hardest part for me was actually generating the grid via code without any HTML or CSS. The trick was a 2-dimensional loop, followed by stylizing each div square with jQuery by dividing the height and width of the whole grid by the size of the div square that was passed into the loop (link to the code below). The other functions were pretty straightforward thanks to the magic of jQuery. My code can be found here GitHub.
Like I mentioned last week, the merit in TOP is in its projects, and I find myself constantly checking to see how close I am to the next one. It’s what motivates me to spend hours everyday reading, watching videos, completing tutorials, or whatever it takes to get to the next project. Luckily, they're sprinkled in the curriculum in between every few sections.
Learning Ruby
Thus, I knew I had two more sections before the next one. So I set to work at learning my first new programming language since the summer - Ruby. This entailed completing the entire Ruby track on Codecademy, which took much longer than expected, and two days of following tutorials normally would have sapped whatever momentum I picked up from the etch-a-sketch project.
However, learning Ruby fueled a different fire for me. While it is a back end language unlike JavaScript, and much of the syntax is dissimilar, the general rules and ideas are essentially the same. There are strings, arithmetic operations, arrays, objects (called hashes), and functions (called methods). The loops are where I had and continue to have a little bit of trouble because of how different the syntax is and how many types there are. But overall, it seems to be a much more human-friendly and beginner-friendly programming language because of how it reads like English. So far, and I know it’s still early, I think I enjoy coding in Ruby more than I’ve enjoyed JavaScript. Let’s hope that continues.
Currently, I am working on the first Ruby project which is a combination of Ruby and the RSpec testing framework. Look for that in the week 3 post.
January 20-22 2017
- Level 1 of RSpec tutorial on Code School
- TDD Tutorial
- Began Ruby testing project
January 19 2017
- Read chapters 4 through 10 of Learn to Program and completed exercises
class OrangeTree
def initialize
@age = 0
@orangeCount = 0
@height = 0
puts "An orange tree is planted."
end
def height
puts "Tree is " + @height.to_s + " feet tall."
end
def oneYearPasses
puts "One year passes"
@age = @age + 1
@height = @height + 10
if @age >= 3
@orangeCount = @orangeCount + 1
end
end
def countTheOranges
puts "The tree has " + @orangeCount.to_s + " oranges!"
end
def pickAnOrange
if @orangeCount > 0
@orangeCount = @orangeCount - 1
puts "What a delicious orange!"
else
puts "There are no oranges to pick this year"
end
end
end
tree = OrangeTree.new
tree.oneYearPasses
tree.oneYearPasses
tree.oneYearPasses
tree.oneYearPasses
tree.height
tree.countTheOranges
tree.pickAnOrange
January 18 2017
- Finished entire Ruby track on codecademy
- Read first 3 chapters of Chris Pine's Learn to Program
January 17 2017
- Completed etch-a-sketch project
- Began Ruby course on codecademy
The Odin Project-Blog Post 1
January 16 2017
Week 1 - “Energy may be likened to the bending of a crossbow; decision, to the releasing of the trigger.”
About five months ago I began teaching myself to code in hopes of a career as a front end developer. When I started, I thought if I put in several hours everyday and followed a study guide with tutorials, I’d be on my way to employable in around half a year. By the time the holidays hit, however, reality set in. I had finished up my path, lost my way, and knew I needed something more. The fundamentals were like second nature, but I needed the next step. I extensively researched coding bootcamps. They seemed to be a 0-100 course of action. Not to mention tuition costs close to $20,000 and none in my area of the country. I was more on the hunt for something that would give me a taste of what a real developer does and help me build a portfolio. Considering where I was in my learning, and where I am geographically, I decided a bootcamp might not be the best option. I asked around on reddit and my thoughts were confirmed. One of those reddit threads led me to The Odin Project.
My only experience with TOP (which I will from here on out refer to it as) up to that point was at the beginning of my journey. I remember hearing about it, giving it a cursory glance, and thinking that it was beyond my level of comprehension. Returning to it after a few months of studying, however, seemed like perfect timing. It is a projects-based, bootcamp style curriculum created by alumni of App Academy. And the best part is it’s free! So with renewed vigor, I began a new journey, and will be chronicling it weekly here.
Conquering My Fear of the Command Line
I love that TOP begins with a course on the command line, because through all of my studying, it is the one thing I knew was absolutely essential but was always afraid of tackling. No other study guide I’ve followed has provided adequate command line material until this one. The first section teaches you how to navigate your computer’s file system, create directories and files, make copies of and remove those files. This leads right into the next section which is on Git and GitHub. Now that I am finally competent using the command line and Git, I’m starting to feel like an actual coder.
Devtools and the Front End
The subcategory following Git is the Front End. These are tools and languages that I am familiar with and have been studying since the summer, so while I was able to traverse this section rather quickly, the real value was in the projects. The first project of TOP is to redo the Google homepage using HTML and CSS. Simple enough. But the fact that it is not a tutorial and no one is holding your hand along the way is what makes it special. You are forced to put what you know into practice and the frustration of creating a webpage pays off in the end with a huge confidence boost. GitHub
The second project is to build an etch-a-sketch tool using JavaScript and jQuery, which I will be getting to at the beginning of week 2.
January 14 2017
January 13 2017
January 12 2017
- The Odin Project Developer tools sectionsBegan and nearly finished HTML/css project - google homepage copy
- Learned how to git -f push origin
Januray 11 2017
January 10 2017
- Created a gh-pages site for this blog
- CodeWars problem - The function should take three arguments - operation(string/char), value1(number), value2(number). The function should return result of numbers after applying the chosen operation.
function basicOp(operation, value1, value2){
return eval(value1+operation+value2);
}
basicOp('-', 15, 18);//-3
- Began The Odin Project and completed section 1: The Basics
- Completed a command line crash course on Viking Code School
- Completed first two sections of Codecademy's command line course
- Installed Ruby, Rails, Heroku, RVM, Ruby Gems, and deployed my first rails app
January 9 2017
- Weekly goals page
- Learned how to make partial templates via the node tutorial video series - you make one file with, for example, a nav that can be included using javascript on all the pages of your site.
- Learned how to use queries and automatically fill input forms with them
- Added links to index navigation and tried to get the CSS right - unfinished
- Asked r/learnjavascript about on-site vs. online bootcamps
January 5 2017
- Design patterns
- Singleton pattern
- Mediator pattern - it's like the "flight tower" of your workflow
- Tried and failed to complete a CodeWars problem but got valuable pseudocoding practice
- Worked on blog
- added month name to header of each page
- added margins to body
- fooled around with index page CSS for awhile
Today was one of the days where I worked for seven or eight hours, but I feel like I barely accomplished anything. I can attribute this feeling to three reasons:
- I had a hard time grasping the design patterns I studied.
- I spent over an hour trying to hack a CodeWars problem but eventually had to unlock the solutions.
- I spent the majority of my evening grinding my teeth and trying to get the index page of the blog right - unfinished business.
However, I did research The Firehose Project, an online coding bootcamp that looks like a could be a viable option moving forward.
January 4 2017
- Created the January page and changed the a:hover effects
- Read about and practiced the module design pattern
//Module Pattern
var cartModule = (function () {
//privates
var cart = [];
return {
//return object exposed to the public
addItem: function(items) {
cart.push(items);
},
countItem: function() {
return cart.length;
}
};
})();
cartModule.addItem("bread");
cartModule.addItem("soap");
cartModule.addItem("beer");
console.log(cartModule.countItem());//3
console.log(cartModule.cart)//undefined because it's private
- And the Revealing module pattern
//The Revealing Module Pattern
var fellowship = (function() {
var quest = "adventure";
var members = function(mems){
return " " + mems + " are going on the " + quest;
}
return {
setMembers: members,
setQuest: quest
};
})();
console.log(fellowship.setMembers("The fellowship"));//The fellowship are going on the adventure
January 3 2017
- Created folder on Weekly-Goals repository to store past weeks' goals/performance, and updated the Readme for the current week
- Continued watching Node JS Tutorial for Beginners
- Learned basic routing
- Installed nodemon
- Learned how to use express, and how much easier it is to route than using conditionals
//Basic Routing
var http = require('http');
var fs = require('fs');
var server = http.createServer(function(request, response){
console.log("server was created" + request.url);
if(request.url === '/home' || request.url === '/'){
response.writeHead(200, {'content-type': 'text/html' });
fs.createReadStream(__dirname + '/node.html').pipe(response);
} else if(request.url === '/dec'){
response.writeHead(200, {'content-type': 'text/html' });
fs.createReadStream(__dirname + '/node-december.html').pipe(response);
} else if(request.url === '/api/nfl'){
var dolphins = [{name: "Miami Dolphins", conference: "AFC", division: "East", city: "Miami Gardens"}];
response.writeHead(200, {'content-type': 'application/json'});
response.end(JSON.stringify(dolphins));
}
else {
response.writeHead(200, {'content-type': 'text/html' });
fs.createReadStream(__dirname + '/node-404.html').pipe(response);
}
});
server.listen(8000);
console.log("listening to localhost 8000");