#ruby, #rails, #OOP, #javascript, #ember

Showing posts with label tech talent south. Show all posts
Showing posts with label tech talent south. Show all posts

1/9/16

Great expect(ations) w RSpec

The holidays are over an I have been chipping away daily. This week I have dedicated much of my time to learning RSpec and testing ruby frameworks. Searching around there isnt an abundance of testing information for beginners on the web, but I signed up for a free trial at Lynda.com and have been very happy with there 6hr class on testing with RSpec. I'm about 3/4 finished and have learned much of the syntax and theory behind RSpec.

If your learning Rails you should learning some sort of testing. It may not be necessary in the beginning, but you will need to have it in your tool belt when things get a bit more complex. Also, I feel that if you wait too long to learn testing it could become a bottle neck in your growing progress.

Also, I can't recommend Lynda.com enough. I have only viewed their course on testing ruby frameworks but I have a feeling that everything they do is at a high level. I plan to continue to use them as I move forward.

Here is a summary of what I have learned the past two days with Lynda and RSpec:

The hiearchy is important: spec file => example groupe => nested group => example => expectations is really the meat of the whole operation and once I understood that I really started to understand the big picture.

Helper methods: It is important to keep your suite as fast as possible therefore encouraging frequent tests. Now this is a non issue for small projects, but as things grow I could see how this would slow things up. Helper methods help keep unnecessary tests from running and slowing down the process.

The let method is really cool because it creates a helper method that takes one argument, which is the name of the method you want to create and then a block of code.

ex.
let(:car) { Car.new}

it "allows reading for :wheels" do
  expect(car.wheels).to eq(4)
end

you can also use subject as your helper

ex.
subject {Car.new}
  it ....
end

........and going farther you can define subjects implicitly by using a class name as the 'describe' argument

ex.
(this is how it looked like before)
describe 'Car'
  subject { Car.new }
  it ....
  end
end

*is the same thing as

describe Car
    it...
    end
end

^Here the subject is implicitly defined. As soon as it encounters the class as an argument it creates a helper method with the subject as the class Car. this works well if the subject you are working with is in only one class.

For Rails testing I learned about SHARED EXAMPLES, which is where RSpec begins to get more complex.

Shared examples let you describe behaviour of classes or modules. When declared,
a shared group's content is stored. It is only realized in the context of
another example group, which provides any context the shared group needs to
run.

In rails this comes in handy when describing things like 'CRUD' in your controller.

ex.
describe ProductsController do
  describe '#index'
    it_behaves_like 'a standard index action'
  end
  describe '#new'
    it_behaves_like 'a standard index action'
  end
end

.....and so on

Should be finishing up the rest of the course tomorrow along with the last touches on my portfolio and resume. I'll be going to a meetup this next Thursday at Hashrocket in Jax Beach, and they give opportunities at the end for attendees to put projects up in front of the group to have it "torn a apart" by the pros. I hope to have a TDD or BDD app built from the ground up by then; I'd love to get live feedback that way.

it is now 4 a.m., please excuse the typos

-John

12/28/15

Tech Talent South Complete, Now What?

Outside of Class
Learning to code is a journey. Let me first acknowledge that I am not at the end of that journey, and I that is a good thing because learning to code is a process, not a means to an end. Looking back, everything that I have learned at TTS over the past 8-weeks is amazing and I am beyond thankful for the opportunity. Last night I was going over my personal notes from the first week and it feels great seeing where I was then and where I am now. Over the course of this class I have built over 30 apps, learned git, github, Ruby, Rails, JavaScript, HTML, CSS and even a few things that werent on the lesson plan such as testing.

Of all the cool things that we did during class, my favorite and most rewarding would definitley be our final project that two classmates and I completed during the final weeks. We were told to make an app using the things we had learned in class; no guidelines. While brainstorming we decided our favorite thing about class was working with api's, so we looked around the web and found some we liked. We eventually choose a weather api and an event api. Two weeks of wrestling with our code we created Drink Weather, a silly web app that takes a users current location and returns the current weather, an adult beverage recomendatioin based on that weather, and also an activity according to weather and location. Working from scratch really helped cement what we had learned throughout class and the all the mistakes that were made during our creation of Drink Weather made us better coders now. We also became very familiar with working on github as a team, and how to deploy a rails app to heroku. I know it's not perfect, but we all took pride in the creation of Drink Weather.

TTS is now completed and here are the next things on my agenda:

  • Test, test, test. Pretty much every dev that I have had the pleasure to talk with over the past month has mentioned the importance of testing which is one of the areas that TTS did not cover in depth (we only spent one day on testing and really only provided a basic introduciton). I understand why it is important and know I will need to be comftorable with the practice in order to land a job. 
  • Learn VIM- I know that there are mixed opinions on vim, atom, sublime, etc. but after talking to some pros it does seem that learning vim could really improve my proficiency and help with job placement.
  • Sharpen my Ruby- I am most familiar with Ruby of all languages with JavaScript coming in second. When getting advice from people in the industry, one of the things I was most interested in was whether I should focus on learning one language really well or spread my self out and learn the basics of a few languages. Most people said to get really good at Ruby first which will not only help with a job but also with the process of learning a new language in the future.
  • Sharpen JavaScript- Like Ruby, I am familiar with JS and want to continue to improve on it. 

I officially quit my previous job at the end of August and aimed at securing a job within six months. That means I will be employed be the end of February, wish me luck.

-John

12/27/15

Kids Code Volunteering

Earlier this month I had the opportunity to volunteer as in instructor for Tech Talent South's Kids Code class. I have now volunteered for two of the classes and it's amazing how scary 8-year olds can be with their parents in the background. All kidding aside, I was really happy with the experience and even more surprised what one can learn when teaching others. I know everyone says it, but teaching a lesson to others (no matter what degree of difficulty) really helps you better understand the material yourself.

In the class we went over very basic code practices beginning with HTML and working our way up to basic Ruby. The kids seemed to respond well to Mike (our other volunteer instructor) and myself, and even though the material was aimed at early beginners, I still found things to learn. For example, while showing kids how to add an image to a web page, I stumbled to remember the exact syntax to do so (thanks Sublime). I can see how relying too much on text editors, even for simple things like adding an image in html, can be bad when that job interview comes around and asks you to get on a white board. TL;DR Learning never stops :)

-John

12/5/15

Tech Talent South Week 4 Complete

It has been almost a month since my last update... the time has really flown. The Tech Talent South program ends in the next two weeks, we are winding down and I am pleased with the amount that I have learned. Just a quick snapshot of some of the things I have been doing over the past month:

A couple weeks ago we began implementing jQuery into some rails apps. We made an ATM app with js and gave it some simple logic. Once I began to understand the syntax I began seeing why everyone uses jQuery. I added a couple functions that change some css elements so the text displays red if the user tries to withdrawl more money than they have in the account. I also began playing around with allowing the user to hit the enter key after typing in the field instead of manually clicking with the mouse.

Code that allows user to hit enter when finished with number field:

function hitEnter(id, buttonid){
$("#enters").keyup(function(event){
if(event.keyCode == 13 && $(id).val() !== ''){
$(buttonid).click();
}
});
}
then I called the function six times and passed the appropriate id's.

hitEnter('#d_amount','#deposit')
hitEnter('#w_amount', '#withdrawl')
hitEnter('#x2c_amount', '#x2check')
hitEnter('#x2s_amount', '#x2save')
hitEnter('#dep_sav', '#d_saving')
hitEnter('#with_sav', '#w_savie')


I spent a good amount of time figuring out how to make the message turn red when a user requests more money than they had in their account. I eventually wrote two very simple functions that changed the css from red to black:


function red(){
$('#message').toggleClass('warning')
$('#message').text('you do not have enough money')
}

function backBlack(){
if ($('#message').hasClass('warning')){
$('#message').toggleClass('warning')
}
}

then called the functions like this:

$('#x2check').click(function(){
var amount = parseFloat($('#x2c_amount').val())
$('#x2c_amount').val('')

if (savings < amount){
alert("you do not have enough funds")
red()
} else {
backBlack()
savings -= amount
checking += amount
$('#message').text("Your transfer from savings to checking for quot; + amount + " was completed.")
}
})

Two of my favorite things we have done with rails over the past month was using Omniauth to allow user to sign in with an existing account like facebook or google+ and using google maps api and geocoder to that allowed users to find updated bus arrival times. For our facebook log in we used the omniauth gem with figaro to hide our API key's secret. We then used the omni_auth method to to create the user profile using the "provider" "userid" and "name" from facebook. For our bus app we set out to to create an app that would take an address from the user and then let the user know if there is a bus close by. We created a basic form to allow user input and stored nearby buses in an empty array after looping with a do loop. Using geocodes lat and longitude capabilities in our model, we then grabbed the bus system's api using a really cool gem called HTTparty that does all the parsing for us. We then implemented a live google map showing the location of the current bus using ajax.

Next week we will be working on more rails apps and I will finish the last bit of JavaScript on my portfolio site.

-John

11/9/15

Tech Talent South Week 2 Update

Tech Talent South has greatly sharpened my understanding of many programming basics I thought I had already mastered. It has only been two weeks with the program and  I cannot not over emphasize how great it is to have an instructor to bounce questions off of. TTS runs four days a week, four hours each class and two extra office hours each day. So far we have covered the basics of Ruby (arrays, methods, hashes, and Classes), which I had studied when I first began to learn in August by reading Chris Pine's book, "Learn to Program". It was a good refresher on the Ruby language since I had not done anything with Ruby since I read Pines book and I also enjoyed being around other students during the learning process. I have also found it valuable to see how others work out the problems as they go; it ultimately helps me think about problems in different ways, something I could not duplicate working on my own most of the time.

Last week (week 2) we got into Rails which I was really excited about since this was essentially uncharted territory for me. I remember just starting out I wanted to try rails after finishing some ruby stuff but gave up after an installation fail. lol. Thinking back to that point I remember being overwhelmed with all of the information out there and not knowing where the hell to go. Being in this program really helps with that. Now I have a set curriculum with an instructor leading the way to help out when I get hung up on something.

This weekend I started going through the Ruby on Rails Tutorial by Michael Hartl, which is a great supplement to what we are doing in class. I have gotten through the middle of Ch 3, which is basically what we have accomplished in class up to this point. I have to say that going over this book after the work we do in class really helps me understand the concept of rails and how the MVC framework functions. In my own words, when you type something in the browser that then goes to the rails router and requests that page from the controller with the same name. That then, using instance variables, goes to the model which retrieves the information from the database, returns that to the controller which then goes to the view page, renders the html back to the controller and to the browser...and boom, web page.


We created some small rails apps so far including a mock university which uses a database to store classes, students, grades, and depatments. I have gotten a lot more familiar with the command line as a result of using rails as well as a general knowledge of git and heroku. I'm really excited to see what I can get my hands on this week as I continue to further my learning in and out of the classroom.

-John

Tech Talent South Scholarship

Since making the decision to learn how to program I have always been attracted to the idea of a coding bootcamp. The problem for me, however, was that I was unsure of how valuable a two or three month program would ultimately be compared to the cost. About a month ago I heard about Tech Talent South and that they would be teaching a "total immersion" course here in Jacksonville this fall and that they would be offering a 100% scholarship for the semester; I decided to apply. 

A couple of days after my application I received a call from there communications director for a phone interview that lasted about an hour. Over the course of the interview I talked about much of the material I had completed on my own, what I was currently working on, and why I had developed an interest in programming in the first place. I also referenced this blog and some general interests that I had such as volunteering and supporting the hometown Jacksonville Jaguars. Overall I thought the conversation went well, and I was told that I would be accepted to the 8-week program and would also be considered for the scholarship.

Two days later I received the good news: I would be awarded the scholarship for 100% tuition! I was ecstatic to say the least. I have just finished up my second week of class and will update with what I have learned so far, but I believe that the reasons I was awarded this scholarship are very similar to the reasons that employers higher new employees. Here's what you can do to help your chances at landing a similar scholarship or that future dream job:

Ask lots of questions- during the interviewing process the person being interviewed should be asking just as many questions if not more than the person conducting the interview. This not only shows genuine interest and the fact that you have done research on your own about the company you applied for but it also helps for you to decide if the company is a good fit for you.

This website does a great job of giving example questions and also explaining why they are important.

Write a blog- Especially if you are entering a new field such as computer programming, a blog acts as a modern day resume. When interviewing in person or over the phone, a blog will help cover in detail some of your accomplishments and progress that you may forget to mention. Don't worry about how many readers you have, writing shows comprehension, real time progress, initiative, and the ability to communicate. This post by Tim Ferriss goes into more detail about breaking into a new industry and the importance of blogging your progress.

Do your HW- Before applying anywhere, do your research That means check out the website, look up the CEO or founder, and reach out to any current employees or graduates.

-John