- See more at: http://blogtimenow.com/blogging/automatically-redirect-blogger-blog-another-blog-website/#sthash.YsVbCxL0.dpuf Journey to Becoming a Web Developer: programming
Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Sunday, January 19, 2014

Differences between JavaScript and Ruby

Next week at the Flatiron School we will be learning JavaScript. We were asked to blog about some the differences. Here is what I have observed.

Values 
In JavaScript datatypes such as string or number are called values while in Ruby they are just called data types.  Other values in JavaScript are booleans, objects, and, undefined values. Operators in JavaScript are used in the same way as they are in Ruby.  One operator in JavaScript that I learned about is typeof. It can give you the type of value something is. Ruby has something similar which is the method class which can give you the class of an object. 


Variables
JavaScript and Ruby both hold data in variables. In JavaScript syntax var is used before the variable name and in Ruby the variable name alone is used. 
JavaScript




Ruby





 Functions in JavaScript are similar to methods in Ruby.  In JavaScript alert is a variable that contains a function that takes one parameter and shows the result of the expression.  This example  in JavaScript will return the largest number in the argument. 




Math.max is the function that returns 4. In Ruby the method that does this is called max. The same example in Ruby would look like this:




Loops
Loops are used in Ruby and JavaScript in the same way, but the syntax is different. I will show an example of how a while loop looks in JavaScript vs. Ruby.

JavaScript

Ruby








Wednesday, August 7, 2013

Ruby

I'm trying to get a better grasp of Ruby so along with reading Zed Shaw's book I've been doing the lessons on RubyMonk.com. RubyMonk is a pretty good site for learning Ruby, so I'd recommend it. I'm still not the best I Ruby, but I've definitely gotten better. Practice makes perfect. I still haven't solved my Michael Hartl's tutorial issue. Sunday I plan on going to hacker Meetup, so I hope I can get help there. I really can't wait to get back into the tutorial. Once I finish it I want to work on my own Rails site. Not sure what it will be as yet.  That's all for now.

Sunday, August 4, 2013

Introduction

Hello! My name is Keturah, I live in Brooklyn, NY and I'm studying to become a junior rails developer. I got the idea to create this blog from Josh Kemp. He was on this same journey last year and he currently has a job as a junior developer. His story has definitely kept me motivated. If you are interested in becoming a rails developer you should check his blog out Josh Kemp. Right now I'm doing Michael Hartl's tutorial, "Learn Ruby the Hard Way" by Zed Shaw, and Chris Pine's "Learn to Program". All three are great learning materials. Currently I'm stuck on chapter 8 of MH's tutorial. I keep getting this error: rails_projects/sample_app/app/controllers/application_controller.rb:3:in `<class:ApplicationController>': uninitialized constant ApplicationController::SessionsHelper (NameError). So far I haven't been able to solve this issue. I'm thinking maybe it's a formatting thing.  I'll see if someone on Stack Overflow or someone at a hacker Meetup can help. Recently I have finished the Ruby 4 Kids airplane laser game, and the ball game. I'm going to push them up to GitHub once I'm done making my own little changes to them. I'm also going to create my own Ruby game. I so excited about all of this. I really want to become junior developer. That's all for now