FEBRUARY ESCAPED. RECAP:: Best Valentine: Ruby on Rails

FEBRUARY ESCAPED. RECAP:: Best Valentine: Ruby on Rails

red-metallic-heart-valentines-day-ever-so-lovely-earrings1_large

I’ll start with Valentine’s Day – my first date with Ruby on Rails. It was fantastic. We spent five straight hours together on a romantic, blizzardy Saturday afternoon, snuggled in the cozy offices of Dev Bootcamp in the Financial District of NYC. I know it’s early to say this, but from first download to first project pushed to GitHub from my command line…I’m pretty sure it’s love.

Prior to starting the Ruby track in the Code Academy Labs curriculum I had dabbled in every language track aside from Ruby: HTML, CSS, JavaScript, jQuery, Python, and PHP. I’m not sure why I left Ruby for last, but I’m glad that I did. Now I can appreciate Ruby’s elegance.

According to www.ruby-lang.org, “Ruby is a dynamic, open source language with focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.” Ruby was designed and developed by Yukihiro Matsumoto (or “Matz”). Matz created Ruby because he wanted programming to be more enjoyable for the programmer. Ruby was designed to emphasize human needs over computer needs.  Apparently, at a Google Tech Talk in 2008, Matsumoto explained that Ruby is designed to make you fall in love =>

I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of Ruby language.” – Yukihiro Matsumoto | Google Tech Talks, 2008

images

If you’ve ever read any Ruby code, you’ll notice that unlike JavaScript (not to hate), it reads a lot like plain english.

For example…

A JavaScript function generally looks something like this:

var name = function(param1, param2) {

           if (param1 === param2) {

                // executes this code if condition is true!;

           } else {

            // executes this code if condition is false!;

       }

};

In Ruby, the same function generally looks like this:

def name (param1, param2)

      if param 1 > param2

          puts “param1 is greater than param2”

     else

         puts “param2 is greater than param1”

     end

end

See how it’s a little easier? You don’t have to think so much about white space or semicolons in Ruby. In JavaScript, a forgotten or misplaced semicolon will stop your program from running. With Ruby, you will spend less time fixing bugs and more time focusing on the logic of your program.

Ruby is an object-oriented, high-level programming language. High Level programming languages read more like english and less like byte code (think 0101001 – matrix projections on the wall).  High level languages need to be interpreted or compiled into machine code before they can be understood by the computer. Machine code is a low-level language. Machine code is the only language that can be understood by a microprocessor directly without translation. You could code in machine code, but it would be much more complicated. You would need to remember a lot of different combinations of letters and numbers that have no obvious logic (08002FA 0G034FA … etc ).  Low-level languages have very little abstraction between the language and the computer’s instruction set architecture. Low-level languages are obviously more difficult and time-consuming, but they are faster and use less memory since you are basically speaking the same language as your computer (but with a slightly different dialect). However, we are humans, and we love abstractions – so thankfully there are high level languages like Ruby. High Level languages feel more like natural languages and are easier to write, read, and maintain. This graphic from webopedia.com is a nice visualization. Ruby would be at the top of the pyramid.

Credit: http://www.webopedia.com/TERM/H/high_level_language.html
Credit: http://www.webopedia.com/

Ruby is an object-oriented language. For many new programmers the significance of ‘object-oriented programming’ (OOP) is probably flying over your head – it was for me, until I looked it up. We probably won’t be doing anything but OOP because most languages commonly used to build web apps and mobile apps are object oriented. Java, Python, C++, VisualBasic .NET, and Ruby are all ‘OO’.

OOP empowers the human. OOP says logic should be concept driven. First identify concepts in your data and map out the relationships between them, then write your logic. Pre-OOP, programming was about writing logic to manipulate objects/data input, processes, and output. The hierarchy of focus was logic => object; bottom to top, trickle up.  Object Oriented Programming flips that priority over. OOP approaches programming object => logic; top to bottom; no trickling, just powerful organized systematic efficiency.  For example, if I’m using OOP to create an address book, I would focus on the relationships between my data and start categorizing it into “objects”. When I look at my data, I see that all my friends have a Name, Phone Number, and Address. At the highest level, I would need a Person Object that takes Name, Phone, Address.  I can then make a New Person Object, and my program will know that New Person Bob will have a Name, Phone Number, and Address. For more on why OOP makes sense, read this article.

RubyOnRails

I have completed several Ruby on Rails projects. You can see them here: www.github.com/carobinson. More to come.

< C >

“If/Else, The Musical”, starring Flatiron and Manhattan.Js

IMG_3082

I went to the Manhattan.Js Meet Up at Flatiron School on Wednesday night. Speakers included Sara J Chipps (Founder, Girl Develop It), Tom Dale (Co-Founder, Tile-Ember), and Sebastiano Armeli (Spotify).

IMG_3083

I did pretty well for being so new to JavaScript… I won two contests!  I won tickets to a sold out event hosted by LittleBits, the ReactJS Meetup on Februrary 24th, AND tickets to the EmpireJS 2015 conference in April.

empirejs copy

Coincidently, EmpireJS 2015 is Broadway themed this year… And I won a free $350 ticket for coming up with the best JavaScript inspired Broadway show title… “IF/ELSE”.

Empirejstweet copy

We’re still fleshing out the music + casting…

IF (Idina === available){

console.log(“We’re going to make a lot of money!”)

1553370_10153276094034616_8601059147268509795_o

} ELSE {

console.log(“We can always see if Lou Ann is available…”)

louanne copy
‘Lou Ann’ (..me), featured in the Jeff Award winning production of “Hairspray” The Musical at Drury Lane Theater in 2012

};

Of course the first big tech event I’m going to is Broadway themed! You never know where your path will take you…

IF only they knew…

So excited to attend these events and dive into that JavaScript textbook in the meantime.

<C>

“Embrace obstacles, they are just telling you to go back and revisit your path.”

pasted_image_at_2015_02_07_04_35_pm_360

“Embrace obstacles, they are just telling you to go back and revisit your path.”

–  The JavaScript Forum

We are learning JavaScript and jQuery for two weeks. The projects are very similar to  the jQuery projects on Code Academy. The material provided a cursory introduction to JavaScript, but I could probably dive into using jQuery now.

 For you fellow newbs, jQuery is a library of JavaScript code used to build dynamic features like sliders, accordions, widgets and interactive animations into websites. We learned about jQuery syntax, event handlers, styling, and traversing the DOM. In addition to Code Academy, I supplemented with Code School’s try jQuery course : http://try.jquery.com/levels/6/challenges/1.

Per the suggestion of classmates, I’m really excited to dive into this great book on JavaScript & jQuery:

9k=

It’s a very user friendly text-book.You can find it on Amazon here: http://www.amazon.com/JavaScript-JQuery-Interactive-Front-End-Development/dp/1118531647

images

We are also learning about Git.

Git is not the same as gitHub. Git is a Version Control System (VSC) that enables developers to save every draft of their code. If you decide you want to go back to an earlier version, everything is saved and recorded by Git. Github is a social sharing website where developers can upload or ‘push’ their code, and work on a project simultaneously without stepping on toes. Github is similar to working on a GoogleDoc – you can work on the same document remotely, and see what other people are contributing. But, unlike Google Docs, you can work offline, and you can’t delete or over write anyone else’s work. Developers use VCSs to save every piece of code written by any one team member – so nothing gets lost, and everyone is on the same page at all times.

There are three phases of Git: 1. Working Directory, 2. Staging Area, 3. Repository. When you are writing or making changes to code, you are in the working directory. You pull the code from the git repository you want to work from, and bring it into your working directory. Then before you finally ‘push’ your code back to the git repository, it goes to a place called ‘The Staging Area’. When code is ‘staged’ you can still make changes that won’t be saved.  Finally, you commit your code to the git directory/repository that is then posted on your gitHub.  All this is done on your console.

images-1

Here are some other resources for learning Git that I’ve found useful:

Pro Git – : http://git-scm.com/book/en/v2 – you can download the book for free as a PDF.

Git – The simple guide: http://rogerdudler.github.io/git-guide/

15 min tutorial – Try Git via Code School: https://try.github.io/levels/1/challenges/1

More of Difference between Git + Github: http://www.jahya.net/blog/?2013-05-git-vs-github

Let me know if you find these helpful, and feel free to leave more resources in the comments section!

You know what else was exciting this week?? I am on the Leaderboard for Code Academy Labs!

screen_shot_2015-02-06_at_17.28.50

Choose to conquer life.

~

< C >

I don’t practice Santeria, but I do know Sublime – Week 2

I don’t practice Santeria, but I do know Sublime – Week 2

ninjas-on-sublime-text-logo

 Early in the morning, risin’ to the street
Light me up that cigarette and I strap shoes on my feet
Got to find a reason, a reason things went wrong
Got to find a reason why my [ code is ] all gone

#

Code Academy labs surpassed expectations this week. We are now writing all code on the Sublime text editor. Prior to starting this course I was concerned that we would just be learning on the Code Academy browser platform. While the browser platform is great for beginners (me), I feel more confident that I will actually come out of this course with applicable skills. Two weeks in, and I am pretty confident I could start building my own webpages with HTML + CSS. I just have to figure out how to deploy…

The second week was more challenging. The first twenty minutes of class is a lecture; the rest of 4.5 hours is spent pair programming. We had different partners this week. I had the opportunity of being the slightly more knowledgable partner. Coincidently, my partner and I both came from backgrounds in film production.

As a slightly more knowledgeable beginner, I found it important to be cognizant of the following:

1. Slowing down and sharing knowledge

2. Staying confident in what I did know

3. Googling

We had a bit of trouble setting up Sublime at first. My computer did not want to play with it. In fact, it refused to work until we humbled ourselves to it’s power. After 45 minutes of fiddling by myself and the TA, it worked after a hard restart.

 It was my first experience with code magic/mystery.

adn5xmm_460s

However, we did finally get it up and running. And ended up catching up to the rest of the class.

We also learned a fun little Sublime trick called ‘Emmet’. He is awesome. He’s a text-editing ninja. And I shall be his student. Homework is to try to memorize the short-cuts this week.

images

Until then, I have hours and hours of coding a head of me!

< C >

Code Academy Labs – Week 1

partner_codecademylabs1

Hi – My name is Carly. I’m an aspiring web developer living in NYC.

Saturday, Jan 17th was my first class as a student of Cohort Awesome – Code Academy Labs NYC January 2015 Cohort. The Labs curriculum covers HTML, CSS, JavaScript, jQuery, Angular.JS and Ruby on Rails in a 12 week part-time course. The class meets every Saturday from 12-5PM at DevBootcamp in NYC, with roughly 25 hours of take-home work, and an office-hour style Google Hangout on Tuesdays.

The January 2015 Cohort stars 15 dynamic, intelligent, accomplished individuals from various backgrounds. A handful are working in the tech industry. Others boast backgrounds as diverse as theater and banking.

 We tackled the first HTML + CSS projects by pair programming the first day. Pair programming is  when one person “drives” (types), while the other person “navigates”(dictates code). As we are all relative beginners, working in pairs is great opportunity to learn from others while gaining confidence in what you already know.

We programmed for almost 5 straight hours. The time flew by and the experience was invigorating.

I am so grateful to work with Code Academy, and excited to take this next step in my education. I’ll try to make posts each week. I’m hoping this blog will be a resource and a source of encouragement for other women who are interested in learning to code. Feel free to leave comments and ask me questions.

< C >